@dxos/plugin-debug 0.8.4-main.c4373fc → 0.8.4-main.d9fc60f731
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.
- package/LICENSE +102 -5
- package/PLUGIN.mdl +373 -0
- package/README.md +1 -1
- package/dist/lib/neutral/DebugGraph-G4FWS57E.mjs +15 -0
- package/dist/lib/neutral/DebugGraph-G4FWS57E.mjs.map +7 -0
- package/dist/lib/neutral/DebugObjectPanel-OS65NC4M.mjs +59 -0
- package/dist/lib/neutral/DebugObjectPanel-OS65NC4M.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.mjs +59 -0
- package/dist/lib/neutral/DebugPlugin.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.node.mjs +18 -0
- package/dist/lib/neutral/DebugPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.workerd.mjs +12 -0
- package/dist/lib/neutral/DebugPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/DebugSettings-RKYNQIKH.mjs +223 -0
- package/dist/lib/neutral/DebugSettings-RKYNQIKH.mjs.map +7 -0
- package/dist/lib/neutral/DebugSpaceObjectsPanel-BHOCFWDJ.mjs +34 -0
- package/dist/lib/neutral/DebugSpaceObjectsPanel-BHOCFWDJ.mjs.map +7 -0
- package/dist/lib/neutral/DebugStatus-H2BAHN26.mjs +122 -0
- package/dist/lib/neutral/DebugStatus-H2BAHN26.mjs.map +7 -0
- package/dist/lib/neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs +23 -0
- package/dist/lib/neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs.map +7 -0
- package/dist/lib/neutral/GithubPanel-QJKDJRVQ.mjs +177 -0
- package/dist/lib/neutral/GithubPanel-QJKDJRVQ.mjs.map +7 -0
- package/dist/lib/neutral/RegistryPanel-64GIYJHN.mjs +161 -0
- package/dist/lib/neutral/RegistryPanel-64GIYJHN.mjs.map +7 -0
- package/dist/lib/neutral/SpaceGenerator-Y35G6DRV.mjs +146 -0
- package/dist/lib/neutral/SpaceGenerator-Y35G6DRV.mjs.map +7 -0
- package/dist/lib/neutral/Wireframe-WD7S2AUU.mjs +52 -0
- package/dist/lib/neutral/Wireframe-WD7S2AUU.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-XYLTBYKN.mjs +612 -0
- package/dist/lib/neutral/app-graph-builder-XYLTBYKN.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +15 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HOV6MV5B.mjs +43 -0
- package/dist/lib/neutral/chunk-HOV6MV5B.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/{browser/chunk-SRV2AIGJ.mjs → neutral/chunk-UAAGABXZ.mjs} +31 -9
- package/dist/lib/neutral/chunk-UAAGABXZ.mjs.map +7 -0
- package/dist/lib/{browser/SpaceGenerator-54FUIZIH.mjs → neutral/components/index.mjs} +343 -530
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +25 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +18 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +12 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-context-MUZ3KVLU.mjs +17 -0
- package/dist/lib/neutral/react-context-MUZ3KVLU.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-3MDMZGCA.mjs +425 -0
- package/dist/lib/neutral/react-surface-3MDMZGCA.mjs.map +7 -0
- package/dist/lib/neutral/settings-MPM6YUP4.mjs +28 -0
- package/dist/lib/neutral/settings-MPM6YUP4.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +91 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +14 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/DebugPlugin.d.ts +4 -1
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/DebugPlugin.node.d.ts +5 -0
- package/dist/types/src/DebugPlugin.node.d.ts.map +1 -0
- package/dist/types/src/DebugPlugin.test.d.ts +2 -0
- package/dist/types/src/DebugPlugin.test.d.ts.map +1 -0
- package/dist/types/src/DebugPlugin.workerd.d.ts +5 -0
- package/dist/types/src/DebugPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +8 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context.d.ts +4 -2
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +7 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +5 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/components/DebugSettings/DebugSettings.d.ts +11 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts +106 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/index.d.ts +2 -0
- package/dist/types/src/components/DebugSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/index.d.ts +2 -0
- package/dist/types/src/components/SchemaTable/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +4 -5
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/draw-util.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/index.d.ts +2 -2
- package/dist/types/src/components/SpaceGenerator/index.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts +2 -5
- package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -10
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +8 -0
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -0
- package/dist/types/src/containers/DebugGraph/index.d.ts +2 -0
- package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +6 -0
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts +2 -0
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +5 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +2 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugStatus/DebugStatus.d.ts.map +1 -0
- package/dist/types/src/containers/DebugStatus/index.d.ts +2 -0
- package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/DevtoolsOverviewContainer}/DevtoolsOverviewContainer.d.ts +0 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -0
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +2 -0
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts +15 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +106 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts +3 -0
- package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/index.d.ts +2 -0
- package/dist/types/src/containers/GithubPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts +3 -0
- package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts.map +1 -0
- package/dist/types/src/containers/RegistryPanel/index.d.ts +2 -0
- package/dist/types/src/containers/RegistryPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts +11 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/index.d.ts +2 -0
- package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/Wireframe}/Wireframe.d.ts +2 -2
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -0
- package/dist/types/src/containers/Wireframe/index.d.ts +2 -0
- package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +11 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +87 -59
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +8 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +70 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +125 -78
- package/src/DebugPlugin.node.ts +18 -0
- package/src/DebugPlugin.test.ts +29 -0
- package/src/DebugPlugin.tsx +34 -34
- package/src/DebugPlugin.workerd.ts +12 -0
- package/src/capabilities/app-graph-builder.ts +390 -388
- package/src/capabilities/index.ts +5 -5
- package/src/capabilities/react-context.tsx +16 -7
- package/src/capabilities/react-surface.tsx +386 -339
- package/src/capabilities/settings.ts +24 -12
- package/src/components/DebugSettings/DebugSettings.stories.tsx +36 -0
- package/src/components/DebugSettings/DebugSettings.tsx +259 -0
- package/src/components/DebugSettings/index.ts +5 -0
- package/src/components/SchemaTable/index.ts +5 -0
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +38 -44
- package/src/components/SpaceGenerator/draw-util.ts +8 -8
- package/src/components/SpaceGenerator/index.ts +2 -3
- package/src/components/SpaceGenerator/presets.ts +245 -151
- package/src/components/index.ts +4 -8
- package/src/containers/DebugGraph/DebugGraph.tsx +14 -0
- package/src/containers/DebugGraph/index.ts +5 -0
- package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +76 -0
- package/src/containers/DebugObjectPanel/index.ts +5 -0
- package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +47 -0
- package/src/containers/DebugSpaceObjectsPanel/index.ts +5 -0
- package/src/{components → containers/DebugStatus}/DebugStatus.tsx +42 -19
- package/src/containers/DebugStatus/index.ts +5 -0
- package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +25 -0
- package/src/containers/DevtoolsOverviewContainer/index.ts +5 -0
- package/src/containers/GithubPanel/GithubComponent.stories.tsx +38 -0
- package/src/containers/GithubPanel/GithubComponent.tsx +192 -0
- package/src/containers/GithubPanel/GithubPanel.tsx +17 -0
- package/src/containers/GithubPanel/index.ts +5 -0
- package/src/containers/RegistryPanel/RegistryPanel.tsx +150 -0
- package/src/containers/RegistryPanel/index.ts +5 -0
- package/src/containers/SpaceGenerator/SpaceGenerator.tsx +127 -0
- package/src/containers/SpaceGenerator/index.ts +5 -0
- package/src/{components → containers/Wireframe}/Wireframe.tsx +7 -12
- package/src/containers/Wireframe/index.ts +5 -0
- package/src/containers/index.ts +15 -0
- package/src/index.ts +1 -1
- package/src/meta.ts +29 -6
- package/src/plugin.ts +10 -0
- package/src/translations.ts +83 -58
- package/src/types/Settings.ts +16 -0
- package/src/{types.ts → types/index.ts} +21 -11
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/DebugGraph-EDOH6R2G.mjs +0 -20
- package/dist/lib/browser/DebugGraph-EDOH6R2G.mjs.map +0 -7
- package/dist/lib/browser/DevtoolsOverviewContainer-EPD6EWT5.mjs +0 -25
- package/dist/lib/browser/DevtoolsOverviewContainer-EPD6EWT5.mjs.map +0 -7
- package/dist/lib/browser/SpaceGenerator-54FUIZIH.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-I4IHBKKN.mjs +0 -588
- package/dist/lib/browser/app-graph-builder-I4IHBKKN.mjs.map +0 -7
- package/dist/lib/browser/chunk-SRV2AIGJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-SVCKCXCL.mjs +0 -16
- package/dist/lib/browser/chunk-SVCKCXCL.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -131
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-context-QLZE7VSQ.mjs +0 -16
- package/dist/lib/browser/react-context-QLZE7VSQ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-BTWJ2I3F.mjs +0 -772
- package/dist/lib/browser/react-surface-BTWJ2I3F.mjs.map +0 -7
- package/dist/lib/browser/settings-EBVICEEW.mjs +0 -22
- package/dist/lib/browser/settings-EBVICEEW.mjs.map +0 -7
- package/dist/types/src/components/Container.d.ts +0 -5
- package/dist/types/src/components/Container.d.ts.map +0 -1
- package/dist/types/src/components/DebugGraph.d.ts +0 -8
- package/dist/types/src/components/DebugGraph.d.ts.map +0 -1
- package/dist/types/src/components/DebugObjectPanel.d.ts +0 -7
- package/dist/types/src/components/DebugObjectPanel.d.ts.map +0 -1
- package/dist/types/src/components/DebugSettings.d.ts +0 -6
- package/dist/types/src/components/DebugSettings.d.ts.map +0 -1
- package/dist/types/src/components/DebugStatus.d.ts.map +0 -1
- package/dist/types/src/components/DevtoolsOverviewContainer.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +0 -9
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts +0 -15
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts.map +0 -1
- package/dist/types/src/components/Wireframe.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -63
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/components/Container.tsx +0 -15
- package/src/components/DebugGraph.tsx +0 -14
- package/src/components/DebugObjectPanel.tsx +0 -33
- package/src/components/DebugSettings.tsx +0 -159
- package/src/components/DevtoolsOverviewContainer.tsx +0 -20
- package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +0 -52
- package/src/components/SpaceGenerator/SpaceGenerator.tsx +0 -122
- /package/dist/types/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.d.ts +0 -0
- /package/dist/types/src/{components → containers/DebugStatus}/DebugStatus.d.ts +0 -0
- /package/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.tsx +0 -0
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/react-surface.tsx
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as Option from "effect/Option";
|
|
6
|
+
import React, { useCallback } from "react";
|
|
7
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
8
|
+
import { Surface, useOperationInvoker, useSettingsState } from "@dxos/app-framework/ui";
|
|
9
|
+
import { AppCapabilities, LayoutOperation, RootCollectionAnnotation, getObjectPathFromObject } from "@dxos/app-toolkit";
|
|
10
|
+
import { AppSurface, useActiveSpace } from "@dxos/app-toolkit/ui";
|
|
11
|
+
import { AutomergePanel, ConfigPanel, CredentialsPanel, DeviceListPanel, DiagnosticsPanel, EdgeDashboardPanel, FeedsPanel, IdentityPanel, InvocationTraceContainer, KeyringPanel, LoggingPanel, MembersPanel, MetadataPanel, NetworkPanel, ObjectsPanel, QueuesPanel, SchemaPanel, SignalPanel, SpaceInfoPanel, SpaceListPanel, StoragePanel, SwarmPanel, TestingPanel, WorkflowPanel } from "@dxos/devtools";
|
|
12
|
+
import { Annotation, Collection, Feed, Obj } from "@dxos/echo";
|
|
13
|
+
import { log } from "@dxos/log";
|
|
14
|
+
import { ScriptOperation } from "@dxos/plugin-script";
|
|
15
|
+
import { SpaceOperation } from "@dxos/plugin-space";
|
|
16
|
+
import { SpaceState, isSpace } from "@dxos/react-client/echo";
|
|
17
|
+
import { ToolsExplorer } from "@dxos/react-ui-introspect";
|
|
18
|
+
import { DebugSettings } from "#components";
|
|
19
|
+
import { DebugGraph, DebugObjectPanel, DebugSpaceObjectsPanel, DebugStatus, DevtoolsOverviewContainer, RegistryPanel, SpaceGenerator, Wireframe } from "#containers";
|
|
20
|
+
import { meta } from "#meta";
|
|
21
|
+
import { DebugCapabilities, Devtools } from "#types";
|
|
22
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-debug/src/capabilities/react-surface.tsx";
|
|
23
|
+
var MCP_SERVER_URL = "https://introspect-service-labs.dxos.workers.dev/mcp";
|
|
24
|
+
var isSpaceDebug = (data) => data?.type === `${meta.id}.space` && isSpace(data.space);
|
|
25
|
+
var isGraphDebug = (data) => {
|
|
26
|
+
const graph = data?.graph;
|
|
27
|
+
return graph != null && typeof graph === "object" && typeof graph.json === "function" && typeof data?.root === "string";
|
|
28
|
+
};
|
|
29
|
+
var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({ logStore }) {
|
|
30
|
+
const capabilities = yield* Capability.Service;
|
|
31
|
+
const registry = capabilities.get(Capabilities.AtomRegistry);
|
|
32
|
+
const settingsAtom = capabilities.get(DebugCapabilities.Settings);
|
|
33
|
+
const fileUploader = capabilities.getAll(AppCapabilities.FileUploader)[0];
|
|
34
|
+
return Capability.contributes(Capabilities.ReactSurface, [
|
|
35
|
+
Surface.create({
|
|
36
|
+
id: "pluginSettings",
|
|
37
|
+
filter: AppSurface.settings(AppSurface.Article, meta.id),
|
|
38
|
+
component: ({ data: { subject } }) => {
|
|
39
|
+
const { settings, updateSettings } = useSettingsState(subject.atom);
|
|
40
|
+
return /* @__PURE__ */ React.createElement(DebugSettings, {
|
|
41
|
+
settings,
|
|
42
|
+
onSettingsChange: updateSettings,
|
|
43
|
+
logStore,
|
|
44
|
+
onUpload: fileUploader
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}),
|
|
48
|
+
Surface.create({
|
|
49
|
+
id: "space",
|
|
50
|
+
role: "article",
|
|
51
|
+
filter: (data) => isSpaceDebug(data.subject),
|
|
52
|
+
component: ({ role, data }) => {
|
|
53
|
+
const { invokePromise } = useOperationInvoker();
|
|
54
|
+
const handleCreateObject = useCallback((objects) => {
|
|
55
|
+
if (!isSpace(data.subject.space)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const collection = data.subject.space.state.get() === SpaceState.SPACE_READY && Annotation.get(data.subject.space.properties, RootCollectionAnnotation).pipe(Option.getOrUndefined)?.target;
|
|
59
|
+
if (!Obj.instanceOf(Collection.Collection, collection)) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
objects.forEach((object) => {
|
|
63
|
+
void invokePromise(SpaceOperation.AddObject, {
|
|
64
|
+
target: collection,
|
|
65
|
+
object
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}, [
|
|
69
|
+
data.subject.space,
|
|
70
|
+
invokePromise
|
|
71
|
+
]);
|
|
72
|
+
return /* @__PURE__ */ React.createElement(SpaceGenerator, {
|
|
73
|
+
role,
|
|
74
|
+
space: data.subject.space,
|
|
75
|
+
onCreateObjects: handleCreateObject
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}),
|
|
79
|
+
Surface.create({
|
|
80
|
+
id: "appGraph",
|
|
81
|
+
role: "article",
|
|
82
|
+
filter: (data) => isGraphDebug(data.subject),
|
|
83
|
+
component: ({ data }) => /* @__PURE__ */ React.createElement(DebugGraph, {
|
|
84
|
+
graph: data.subject.graph,
|
|
85
|
+
root: data.subject.root
|
|
86
|
+
})
|
|
87
|
+
}),
|
|
88
|
+
Surface.create({
|
|
89
|
+
id: "toolsExplorer",
|
|
90
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.ToolsExplorer),
|
|
91
|
+
component: () => /* @__PURE__ */ React.createElement(ToolsExplorer, {
|
|
92
|
+
serverUrl: MCP_SERVER_URL
|
|
93
|
+
})
|
|
94
|
+
}),
|
|
95
|
+
Surface.create({
|
|
96
|
+
id: "registry",
|
|
97
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Registry),
|
|
98
|
+
component: () => /* @__PURE__ */ React.createElement(RegistryPanel, null)
|
|
99
|
+
}),
|
|
100
|
+
Surface.create({
|
|
101
|
+
id: "wireframe",
|
|
102
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
103
|
+
role: [
|
|
104
|
+
"article",
|
|
105
|
+
"section"
|
|
106
|
+
],
|
|
107
|
+
position: "first",
|
|
108
|
+
filter: (data) => {
|
|
109
|
+
const settings = registry.get(settingsAtom);
|
|
110
|
+
return Obj.isObject(data.subject) && !!settings.wireframe;
|
|
111
|
+
},
|
|
112
|
+
component: ({ data, role, name }) => /* @__PURE__ */ React.createElement(Wireframe, {
|
|
113
|
+
label: `${role}:${name}`,
|
|
114
|
+
object: data.subject,
|
|
115
|
+
classNames: "row-span-2 overflow-hidden"
|
|
116
|
+
})
|
|
117
|
+
}),
|
|
118
|
+
Surface.create({
|
|
119
|
+
id: "objectDebug",
|
|
120
|
+
filter: AppSurface.allOf(AppSurface.literal(AppSurface.Article, "debug"), AppSurface.companion(AppSurface.Article)),
|
|
121
|
+
component: ({ role, data }) => /* @__PURE__ */ React.createElement(DebugObjectPanel, {
|
|
122
|
+
role,
|
|
123
|
+
companionTo: data.companionTo
|
|
124
|
+
})
|
|
125
|
+
}),
|
|
126
|
+
Surface.create({
|
|
127
|
+
id: "devtoolsOverview",
|
|
128
|
+
filter: AppSurface.literal(Surface.makeType("deck-companion--devtools"), "devtools"),
|
|
129
|
+
component: () => /* @__PURE__ */ React.createElement(DevtoolsOverviewContainer, null)
|
|
130
|
+
}),
|
|
131
|
+
Surface.create({
|
|
132
|
+
id: "spaceObjects",
|
|
133
|
+
filter: AppSurface.literal(Surface.makeType("deck-companion--space-objects"), "space-objects"),
|
|
134
|
+
component: () => {
|
|
135
|
+
const space = useActiveSpace();
|
|
136
|
+
if (!space) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
return /* @__PURE__ */ React.createElement(DebugSpaceObjectsPanel, {
|
|
140
|
+
space
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}),
|
|
144
|
+
Surface.create({
|
|
145
|
+
id: "debugStatus",
|
|
146
|
+
role: "status-indicator",
|
|
147
|
+
position: "first",
|
|
148
|
+
component: () => /* @__PURE__ */ React.createElement(DebugStatus, null)
|
|
149
|
+
}),
|
|
150
|
+
//
|
|
151
|
+
// Devtools
|
|
152
|
+
//
|
|
153
|
+
Surface.create({
|
|
154
|
+
id: "client.config",
|
|
155
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Config),
|
|
156
|
+
component: () => /* @__PURE__ */ React.createElement(ConfigPanel, {
|
|
157
|
+
vaultSelector: false
|
|
158
|
+
})
|
|
159
|
+
}),
|
|
160
|
+
Surface.create({
|
|
161
|
+
id: "client.storage",
|
|
162
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Storage),
|
|
163
|
+
component: () => /* @__PURE__ */ React.createElement(StoragePanel, null)
|
|
164
|
+
}),
|
|
165
|
+
Surface.create({
|
|
166
|
+
id: "client.logs",
|
|
167
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Logs),
|
|
168
|
+
component: () => /* @__PURE__ */ React.createElement(LoggingPanel, null)
|
|
169
|
+
}),
|
|
170
|
+
Surface.create({
|
|
171
|
+
id: "client.diagnostics",
|
|
172
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Diagnostics),
|
|
173
|
+
component: () => /* @__PURE__ */ React.createElement(DiagnosticsPanel, null)
|
|
174
|
+
}),
|
|
175
|
+
Surface.create({
|
|
176
|
+
id: "halo.identity",
|
|
177
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Identity),
|
|
178
|
+
component: () => /* @__PURE__ */ React.createElement(IdentityPanel, null)
|
|
179
|
+
}),
|
|
180
|
+
Surface.create({
|
|
181
|
+
id: "halo.devices",
|
|
182
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Devices),
|
|
183
|
+
component: () => /* @__PURE__ */ React.createElement(DeviceListPanel, null)
|
|
184
|
+
}),
|
|
185
|
+
Surface.create({
|
|
186
|
+
id: "halo.keyring",
|
|
187
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Keyring),
|
|
188
|
+
component: () => /* @__PURE__ */ React.createElement(KeyringPanel, null)
|
|
189
|
+
}),
|
|
190
|
+
Surface.create({
|
|
191
|
+
id: "halo.credentials",
|
|
192
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Credentials),
|
|
193
|
+
component: () => {
|
|
194
|
+
const space = useActiveSpace();
|
|
195
|
+
if (!space) {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
return /* @__PURE__ */ React.createElement(CredentialsPanel, {
|
|
199
|
+
space
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}),
|
|
203
|
+
Surface.create({
|
|
204
|
+
id: "echo.spaces",
|
|
205
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Spaces),
|
|
206
|
+
component: () => {
|
|
207
|
+
const { invokePromise } = useOperationInvoker();
|
|
208
|
+
const handleSelect = useCallback(() => invokePromise(LayoutOperation.Open, {
|
|
209
|
+
subject: [
|
|
210
|
+
Devtools.Echo.Space
|
|
211
|
+
]
|
|
212
|
+
}), [
|
|
213
|
+
invokePromise
|
|
214
|
+
]);
|
|
215
|
+
return /* @__PURE__ */ React.createElement(SpaceListPanel, {
|
|
216
|
+
onSelect: handleSelect
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}),
|
|
220
|
+
Surface.create({
|
|
221
|
+
id: "echo.space",
|
|
222
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Space),
|
|
223
|
+
component: () => {
|
|
224
|
+
const space = useActiveSpace();
|
|
225
|
+
const { invokePromise } = useOperationInvoker();
|
|
226
|
+
const handleSelect = useCallback(() => invokePromise(LayoutOperation.Open, {
|
|
227
|
+
subject: [
|
|
228
|
+
Devtools.Echo.Feeds
|
|
229
|
+
]
|
|
230
|
+
}), [
|
|
231
|
+
invokePromise
|
|
232
|
+
]);
|
|
233
|
+
if (!space) {
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
return /* @__PURE__ */ React.createElement(SpaceInfoPanel, {
|
|
237
|
+
space,
|
|
238
|
+
onSelectFeed: handleSelect,
|
|
239
|
+
onSelectPipeline: handleSelect
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}),
|
|
243
|
+
Surface.create({
|
|
244
|
+
id: "echo.feeds",
|
|
245
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Feeds),
|
|
246
|
+
component: () => {
|
|
247
|
+
const space = useActiveSpace();
|
|
248
|
+
if (!space) {
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
return /* @__PURE__ */ React.createElement(FeedsPanel, {
|
|
252
|
+
space
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}),
|
|
256
|
+
Surface.create({
|
|
257
|
+
id: "echo.objects",
|
|
258
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Objects),
|
|
259
|
+
component: () => {
|
|
260
|
+
const space = useActiveSpace();
|
|
261
|
+
if (!space) {
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
return /* @__PURE__ */ React.createElement(ObjectsPanel, {
|
|
265
|
+
space
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}),
|
|
269
|
+
Surface.create({
|
|
270
|
+
id: "echo.schema",
|
|
271
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Schema),
|
|
272
|
+
component: () => {
|
|
273
|
+
const space = useActiveSpace();
|
|
274
|
+
if (!space) {
|
|
275
|
+
return null;
|
|
276
|
+
}
|
|
277
|
+
return /* @__PURE__ */ React.createElement(SchemaPanel, {
|
|
278
|
+
space
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
}),
|
|
282
|
+
Surface.create({
|
|
283
|
+
id: "echo.automerge",
|
|
284
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Automerge),
|
|
285
|
+
component: () => {
|
|
286
|
+
const space = useActiveSpace();
|
|
287
|
+
if (!space) {
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
return /* @__PURE__ */ React.createElement(AutomergePanel, {
|
|
291
|
+
space
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
}),
|
|
295
|
+
Surface.create({
|
|
296
|
+
id: "echo.queues",
|
|
297
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Queues),
|
|
298
|
+
component: () => /* @__PURE__ */ React.createElement(QueuesPanel, null)
|
|
299
|
+
}),
|
|
300
|
+
Surface.create({
|
|
301
|
+
id: "echo.members",
|
|
302
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Members),
|
|
303
|
+
component: () => {
|
|
304
|
+
const space = useActiveSpace();
|
|
305
|
+
if (!space) {
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
return /* @__PURE__ */ React.createElement(MembersPanel, {
|
|
309
|
+
space
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
}),
|
|
313
|
+
Surface.create({
|
|
314
|
+
id: "echo.metadata",
|
|
315
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Metadata),
|
|
316
|
+
component: () => /* @__PURE__ */ React.createElement(MetadataPanel, null)
|
|
317
|
+
}),
|
|
318
|
+
Surface.create({
|
|
319
|
+
id: "mesh.signal",
|
|
320
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Signal),
|
|
321
|
+
component: () => /* @__PURE__ */ React.createElement(SignalPanel, null)
|
|
322
|
+
}),
|
|
323
|
+
Surface.create({
|
|
324
|
+
id: "mesh.swarm",
|
|
325
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Swarm),
|
|
326
|
+
component: () => /* @__PURE__ */ React.createElement(SwarmPanel, null)
|
|
327
|
+
}),
|
|
328
|
+
Surface.create({
|
|
329
|
+
id: "mesh.network",
|
|
330
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Network),
|
|
331
|
+
component: () => {
|
|
332
|
+
const space = useActiveSpace();
|
|
333
|
+
if (!space) {
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
return /* @__PURE__ */ React.createElement(NetworkPanel, {
|
|
337
|
+
space
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
}),
|
|
341
|
+
Surface.create({
|
|
342
|
+
id: "edge.dashboard",
|
|
343
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Dashboard),
|
|
344
|
+
component: () => /* @__PURE__ */ React.createElement(EdgeDashboardPanel, null)
|
|
345
|
+
}),
|
|
346
|
+
Surface.create({
|
|
347
|
+
id: "edge.workflows",
|
|
348
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Workflows),
|
|
349
|
+
component: () => {
|
|
350
|
+
const space = useActiveSpace();
|
|
351
|
+
if (!space) {
|
|
352
|
+
return null;
|
|
353
|
+
}
|
|
354
|
+
return /* @__PURE__ */ React.createElement(WorkflowPanel, {
|
|
355
|
+
space
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
}),
|
|
359
|
+
Surface.create({
|
|
360
|
+
id: "edge.traces",
|
|
361
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Traces),
|
|
362
|
+
component: () => {
|
|
363
|
+
const space = useActiveSpace();
|
|
364
|
+
if (!space) {
|
|
365
|
+
return null;
|
|
366
|
+
}
|
|
367
|
+
const feed = space.properties.invocationTraceFeed?.target;
|
|
368
|
+
const feedDXN = feed ? Feed.getQueueUri(feed) : void 0;
|
|
369
|
+
return /* @__PURE__ */ React.createElement(InvocationTraceContainer, {
|
|
370
|
+
db: space.db,
|
|
371
|
+
feedDXN,
|
|
372
|
+
detailAxis: "block"
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
}),
|
|
376
|
+
Surface.create({
|
|
377
|
+
id: "edge.testing",
|
|
378
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Testing),
|
|
379
|
+
component: () => {
|
|
380
|
+
const { invokePromise } = useOperationInvoker();
|
|
381
|
+
const onSpaceCreate = useCallback(async (space) => {
|
|
382
|
+
await space.waitUntilReady();
|
|
383
|
+
await invokePromise(SpaceOperation.Migrate, {
|
|
384
|
+
space
|
|
385
|
+
});
|
|
386
|
+
await space.db.flush();
|
|
387
|
+
}, [
|
|
388
|
+
invokePromise
|
|
389
|
+
]);
|
|
390
|
+
const onScriptPluginOpen = useCallback(async (space) => {
|
|
391
|
+
await space.waitUntilReady();
|
|
392
|
+
const createResult = await invokePromise(ScriptOperation.CreateScript, {
|
|
393
|
+
db: space.db
|
|
394
|
+
});
|
|
395
|
+
if (createResult.data?.object) {
|
|
396
|
+
await invokePromise(SpaceOperation.AddObject, {
|
|
397
|
+
target: space.db,
|
|
398
|
+
object: createResult.data.object
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
log.info("script created", {
|
|
402
|
+
result: createResult
|
|
403
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 401, S: this });
|
|
404
|
+
if (createResult.data?.object) {
|
|
405
|
+
await invokePromise(LayoutOperation.Open, {
|
|
406
|
+
subject: [
|
|
407
|
+
getObjectPathFromObject(createResult.data.object)
|
|
408
|
+
]
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
}, [
|
|
412
|
+
invokePromise
|
|
413
|
+
]);
|
|
414
|
+
return /* @__PURE__ */ React.createElement(TestingPanel, {
|
|
415
|
+
onSpaceCreate,
|
|
416
|
+
onScriptPluginOpen
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
})
|
|
420
|
+
]);
|
|
421
|
+
}));
|
|
422
|
+
export {
|
|
423
|
+
react_surface_default as default
|
|
424
|
+
};
|
|
425
|
+
//# sourceMappingURL=react-surface-3MDMZGCA.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\nimport React, { useCallback } from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface, useOperationInvoker, useSettingsState } from '@dxos/app-framework/ui';\nimport { AppCapabilities, LayoutOperation, RootCollectionAnnotation, getObjectPathFromObject } from '@dxos/app-toolkit';\nimport { AppSurface, useActiveSpace } from '@dxos/app-toolkit/ui';\nimport {\n AutomergePanel,\n ConfigPanel,\n CredentialsPanel,\n DeviceListPanel,\n DiagnosticsPanel,\n EdgeDashboardPanel,\n FeedsPanel,\n IdentityPanel,\n InvocationTraceContainer,\n KeyringPanel,\n LoggingPanel,\n MembersPanel,\n MetadataPanel,\n NetworkPanel,\n ObjectsPanel,\n QueuesPanel,\n SchemaPanel,\n SignalPanel,\n SpaceInfoPanel,\n SpaceListPanel,\n StoragePanel,\n SwarmPanel,\n TestingPanel,\n WorkflowPanel,\n} from '@dxos/devtools';\nimport { Annotation, Collection, Feed, Obj } from '@dxos/echo';\nimport { log } from '@dxos/log';\nimport { type IdbLogStore } from '@dxos/log-store-idb';\nimport { type Graph } from '@dxos/plugin-graph';\nimport { ScriptOperation } from '@dxos/plugin-script';\nimport { SpaceOperation } from '@dxos/plugin-space';\nimport { type Space, SpaceState, isSpace } from '@dxos/react-client/echo';\nimport { ToolsExplorer } from '@dxos/react-ui-introspect';\n\nimport { DebugSettings } from '#components';\nimport {\n DebugGraph,\n DebugObjectPanel,\n DebugSpaceObjectsPanel,\n DebugStatus,\n DevtoolsOverviewContainer,\n RegistryPanel,\n SpaceGenerator,\n Wireframe,\n} from '#containers';\nimport { meta } from '#meta';\nimport { DebugCapabilities, type Settings, Devtools } from '#types';\n\n// TODO(burdon): Move to config.\nconst MCP_SERVER_URL = 'https://introspect-service-labs.dxos.workers.dev/mcp';\n\ntype SpaceDebug = {\n type: string;\n space: Space;\n};\n\ntype GraphDebug = {\n graph: Graph.Graph;\n root: string;\n};\n\nconst isSpaceDebug = (data: any): data is SpaceDebug => data?.type === `${meta.id}.space` && isSpace(data.space);\nconst isGraphDebug = (data: any): data is GraphDebug => {\n const graph = data?.graph;\n return (\n graph != null && typeof graph === 'object' && typeof graph.json === 'function' && typeof data?.root === 'string'\n );\n};\n\ntype ReactSurfaceOptions = {\n logStore?: IdbLogStore;\n};\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* ({ logStore }: ReactSurfaceOptions) {\n const capabilities = yield* Capability.Service;\n const registry = capabilities.get(Capabilities.AtomRegistry);\n const settingsAtom = capabilities.get(DebugCapabilities.Settings);\n const fileUploader = capabilities.getAll(AppCapabilities.FileUploader)[0];\n\n return Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: 'pluginSettings',\n filter: AppSurface.settings(AppSurface.Article, meta.id),\n component: ({ data: { subject } }) => {\n const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);\n return (\n <DebugSettings\n settings={settings}\n onSettingsChange={updateSettings}\n logStore={logStore}\n onUpload={fileUploader}\n />\n );\n },\n }),\n Surface.create({\n id: 'space',\n role: 'article',\n filter: (data): data is { subject: SpaceDebug } => isSpaceDebug(data.subject),\n component: ({ role, data }) => {\n const { invokePromise } = useOperationInvoker();\n\n const handleCreateObject = useCallback(\n (objects: Obj.Unknown[]) => {\n if (!isSpace(data.subject.space)) {\n return;\n }\n\n const collection =\n data.subject.space.state.get() === SpaceState.SPACE_READY &&\n Annotation.get(data.subject.space.properties, RootCollectionAnnotation).pipe(Option.getOrUndefined)\n ?.target;\n if (!Obj.instanceOf(Collection.Collection, collection)) {\n return;\n }\n\n objects.forEach((object) => {\n void invokePromise(SpaceOperation.AddObject, {\n target: collection,\n object,\n });\n });\n },\n [data.subject.space, invokePromise],\n );\n\n return <SpaceGenerator role={role} space={data.subject.space} onCreateObjects={handleCreateObject} />;\n },\n }),\n Surface.create({\n id: 'appGraph',\n role: 'article',\n filter: (data): data is { subject: GraphDebug } => isGraphDebug(data.subject),\n component: ({ data }) => <DebugGraph graph={data.subject.graph} root={data.subject.root} />,\n }),\n Surface.create({\n id: 'toolsExplorer',\n filter: AppSurface.literal(AppSurface.Article, Devtools.ToolsExplorer),\n component: () => <ToolsExplorer serverUrl={MCP_SERVER_URL} />,\n }),\n Surface.create({\n id: 'registry',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Registry),\n component: () => <RegistryPanel />,\n }),\n Surface.create({\n id: 'wireframe',\n // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.\n role: ['article', 'section'],\n position: 'first',\n filter: (data): data is { subject: Obj.Unknown } => {\n const settings = registry.get(settingsAtom);\n return Obj.isObject(data.subject) && !!settings.wireframe;\n },\n component: ({ data, role, name }) => (\n <Wireframe label={`${role}:${name}`} object={data.subject} classNames='row-span-2 overflow-hidden' />\n ),\n }),\n Surface.create({\n id: 'objectDebug',\n filter: AppSurface.allOf(\n AppSurface.literal(AppSurface.Article, 'debug'),\n AppSurface.companion(AppSurface.Article),\n ),\n component: ({ role, data }) => <DebugObjectPanel role={role} companionTo={data.companionTo} />,\n }),\n Surface.create({\n id: 'devtoolsOverview',\n filter: AppSurface.literal(Surface.makeType<{ subject: string }>('deck-companion--devtools'), 'devtools'),\n component: () => <DevtoolsOverviewContainer />,\n }),\n Surface.create({\n id: 'spaceObjects',\n filter: AppSurface.literal(\n Surface.makeType<{ subject: string }>('deck-companion--space-objects'),\n 'space-objects',\n ),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <DebugSpaceObjectsPanel space={space} />;\n },\n }),\n\n Surface.create({\n id: 'debugStatus',\n role: 'status-indicator',\n position: 'first',\n component: () => <DebugStatus />,\n }),\n\n //\n // Devtools\n //\n\n Surface.create({\n id: 'client.config',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Config),\n component: () => <ConfigPanel vaultSelector={false} />,\n }),\n Surface.create({\n id: 'client.storage',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Storage),\n component: () => <StoragePanel />,\n }),\n Surface.create({\n id: 'client.logs',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Logs),\n component: () => <LoggingPanel />,\n }),\n Surface.create({\n id: 'client.diagnostics',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Diagnostics),\n component: () => <DiagnosticsPanel />,\n }),\n Surface.create({\n id: 'halo.identity',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Identity),\n component: () => <IdentityPanel />,\n }),\n Surface.create({\n id: 'halo.devices',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Devices),\n component: () => <DeviceListPanel />,\n }),\n Surface.create({\n id: 'halo.keyring',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Keyring),\n component: () => <KeyringPanel />,\n }),\n Surface.create({\n id: 'halo.credentials',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Credentials),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <CredentialsPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'echo.spaces',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Spaces),\n component: () => {\n const { invokePromise } = useOperationInvoker();\n const handleSelect = useCallback(\n () => invokePromise(LayoutOperation.Open, { subject: [Devtools.Echo.Space] }),\n [invokePromise],\n );\n return <SpaceListPanel onSelect={handleSelect} />;\n },\n }),\n Surface.create({\n id: 'echo.space',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Space),\n component: () => {\n const space = useActiveSpace();\n const { invokePromise } = useOperationInvoker();\n const handleSelect = useCallback(\n () => invokePromise(LayoutOperation.Open, { subject: [Devtools.Echo.Feeds] }),\n [invokePromise],\n );\n if (!space) {\n return null;\n }\n\n return <SpaceInfoPanel space={space} onSelectFeed={handleSelect} onSelectPipeline={handleSelect} />;\n },\n }),\n Surface.create({\n id: 'echo.feeds',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Feeds),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <FeedsPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'echo.objects',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Objects),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <ObjectsPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'echo.schema',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Schema),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <SchemaPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'echo.automerge',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Automerge),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <AutomergePanel space={space} />;\n },\n }),\n Surface.create({\n id: 'echo.queues',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Queues),\n component: () => <QueuesPanel />,\n }),\n Surface.create({\n id: 'echo.members',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Members),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <MembersPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'echo.metadata',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Metadata),\n component: () => <MetadataPanel />,\n }),\n Surface.create({\n id: 'mesh.signal',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Signal),\n component: () => <SignalPanel />,\n }),\n Surface.create({\n id: 'mesh.swarm',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Swarm),\n component: () => <SwarmPanel />,\n }),\n Surface.create({\n id: 'mesh.network',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Network),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <NetworkPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'edge.dashboard',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Dashboard),\n component: () => <EdgeDashboardPanel />,\n }),\n Surface.create({\n id: 'edge.workflows',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Workflows),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <WorkflowPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'edge.traces',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Traces),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n const feed = space.properties.invocationTraceFeed?.target;\n const feedDXN = feed ? Feed.getQueueUri(feed) : undefined;\n return <InvocationTraceContainer db={space.db} feedDXN={feedDXN} detailAxis='block' />;\n },\n }),\n Surface.create({\n id: 'edge.testing',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Testing),\n component: () => {\n const { invokePromise } = useOperationInvoker();\n const onSpaceCreate = useCallback(\n async (space: Space) => {\n await space.waitUntilReady();\n await invokePromise(SpaceOperation.Migrate, { space });\n await space.db.flush();\n },\n [invokePromise],\n );\n const onScriptPluginOpen = useCallback(\n async (space: Space) => {\n await space.waitUntilReady();\n const createResult = await invokePromise(ScriptOperation.CreateScript, { db: space.db });\n if (createResult.data?.object) {\n await invokePromise(SpaceOperation.AddObject, { target: space.db, object: createResult.data.object });\n }\n log.info('script created', { result: createResult });\n if (createResult.data?.object) {\n await invokePromise(LayoutOperation.Open, {\n subject: [getObjectPathFromObject(createResult.data.object)],\n });\n }\n },\n [invokePromise],\n );\n return <TestingPanel onSpaceCreate={onSpaceCreate} onScriptPluginOpen={onScriptPluginOpen} />;\n },\n }),\n ]);\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AACxB,OAAOC,SAASC,mBAAmB;AAEnC,SAASC,cAAcC,kBAAkB;AACzC,SAASC,SAASC,qBAAqBC,wBAAwB;AAC/D,SAASC,iBAAiBC,iBAAiBC,0BAA0BC,+BAA+B;AACpG,SAASC,YAAYC,sBAAsB;AAC3C,SACEC,gBACAC,aACAC,kBACAC,iBACAC,kBACAC,oBACAC,YACAC,eACAC,0BACAC,cACAC,cACAC,cACAC,eACAC,cACAC,cACAC,aACAC,aACAC,aACAC,gBACAC,gBACAC,cACAC,YACAC,cACAC,qBACK;AACP,SAASC,YAAYC,YAAYC,MAAMC,WAAW;AAClD,SAASC,WAAW;AAGpB,SAASC,uBAAuB;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AEjB;;cAGI,qBAAqB,YAAMA,OAActC,UAAAA;gBAAgC6D,MAAIhB,eAAQ;AAAC,gBAAA,eAAA,MAAA,cAAA,gBAAA,cAAA;YAClFsB,IAAAA,MAAAA;;2BACsDtB,MAAMgB,QAAE;kBAAEjB,cAAQuB,eAAkBvB,WAAM;cAAC,QAAA,MAAA;cACrG,QAAA,aAAA,KAAA;YACIwB,CAAAA;;AAA8C,cAAA,KAAA,kBAAA;YAC9CD,QAAAA;2BACI7B,YAAcxE,GAAAA,cAAgBuG,GAAAA,KAAM,GAAA,KAAA,CAAA;2BAC/B,MAAA,QAAA;gCAACrG,gBAAwBmG,MAAAA;uBAA0B;gBAC9D,wBAAA,aAAA,KAAA,MAAA;cACF;YAEF,CAAA;UAAC7B;WAAc;UAEjB;;eAAmDgC,sBAAoBA,cAAAA,cAAAA;;UACzE;QACF,CAAA;MACD;IAEH,CAAA;;;",
|
|
6
|
+
"names": ["Effect", "Option", "React", "useCallback", "Capabilities", "Capability", "Surface", "useOperationInvoker", "useSettingsState", "AppCapabilities", "LayoutOperation", "RootCollectionAnnotation", "getObjectPathFromObject", "AppSurface", "useActiveSpace", "AutomergePanel", "ConfigPanel", "CredentialsPanel", "DeviceListPanel", "DiagnosticsPanel", "EdgeDashboardPanel", "FeedsPanel", "IdentityPanel", "InvocationTraceContainer", "KeyringPanel", "LoggingPanel", "MembersPanel", "MetadataPanel", "NetworkPanel", "ObjectsPanel", "QueuesPanel", "SchemaPanel", "SignalPanel", "SpaceInfoPanel", "SpaceListPanel", "StoragePanel", "SwarmPanel", "TestingPanel", "WorkflowPanel", "Annotation", "Collection", "Feed", "Obj", "log", "ScriptOperation", "SpaceOperation", "SpaceState", "isSpace", "ToolsExplorer", "DebugSettings", "DebugGraph", "DebugObjectPanel", "DebugSpaceObjectsPanel", "DebugStatus", "DevtoolsOverviewContainer", "RegistryPanel", "SpaceGenerator", "Wireframe", "meta", "DebugCapabilities", "Devtools", "isGraphDebug", "data", "graph", "makeModule", "fnUntraced", "logStore", "registry", "capabilities", "AtomRegistry", "settingsAtom", "fileUploader", "getAll", "FileUploader", "contributes", "filter", "component", "settings", "updateSettings", "onSettingsChange", "onUpload", "role", "invokePromise", "handleCreateObject", "subject", "objects", "target", "collection", "object", "space", "onCreateObjects", "root", "create", "serverUrl", "MCP_SERVER_URL", "position", "isObject", "name", "classNames", "companionTo", "vaultSelector", "handleSelect", "Echo", "onSelectPipeline", "feed", "db", "feedDXN", "detailAxis", "onSpaceCreate", "waitUntilReady", "Migrate", "createResult", "info", "Open", "onScriptPluginOpen"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/settings.ts
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import { Capability } from "@dxos/app-framework";
|
|
6
|
+
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
7
|
+
import { createKvsStore } from "@dxos/effect";
|
|
8
|
+
import { meta } from "#meta";
|
|
9
|
+
import { DebugCapabilities, Settings } from "#types";
|
|
10
|
+
var settings_default = Capability.makeModule(() => Effect.sync(() => {
|
|
11
|
+
const settingsAtom = createKvsStore({
|
|
12
|
+
key: meta.id,
|
|
13
|
+
schema: Settings.Settings,
|
|
14
|
+
defaultValue: () => ({})
|
|
15
|
+
});
|
|
16
|
+
return [
|
|
17
|
+
Capability.contributes(DebugCapabilities.Settings, settingsAtom),
|
|
18
|
+
Capability.contributes(AppCapabilities.Settings, {
|
|
19
|
+
prefix: meta.id,
|
|
20
|
+
schema: Settings.Settings,
|
|
21
|
+
atom: settingsAtom
|
|
22
|
+
})
|
|
23
|
+
];
|
|
24
|
+
}));
|
|
25
|
+
export {
|
|
26
|
+
settings_default as default
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=settings-MPM6YUP4.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 * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { createKvsStore } from '@dxos/effect';\n\nimport { meta } from '#meta';\nimport { DebugCapabilities, Settings } from '#types';\n\nexport default Capability.makeModule(() =>\n Effect.sync(() => {\n const settingsAtom = createKvsStore({\n key: meta.id,\n schema: Settings.Settings,\n defaultValue: () => ({}),\n });\n\n return [\n Capability.contributes(DebugCapabilities.Settings, settingsAtom),\n Capability.contributes(AppCapabilities.Settings, {\n prefix: meta.id,\n schema: Settings.Settings,\n atom: settingsAtom,\n }),\n ];\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAChC,SAASC,sBAAsB;AAE/B,SAASC,YAAY;AACrB,SAASC,mBAAmBC,gBAAgB;AAE5C,IAAA,mBAAeL,WAAWM,WAAW,MAC5BC,YAAK,MAAA;AACV,QAAMC,eAAeN,eAAe;IAClCO,KAAKN,KAAKO;IACVC,QAAQN,SAASA;IACjBO,cAAc,OAAO,CAAC;EACxB,CAAA;AAEA,SAAO;IACLZ,WAAWa,YAAYT,kBAAkBC,UAAUG,YAAAA;IACnDR,WAAWa,YAAYZ,gBAAgBI,UAAU;MAC/CS,QAAQX,KAAKO;MACbC,QAAQN,SAASA;MACjBU,MAAMP;IACR,CAAA;;AAEJ,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Capability", "AppCapabilities", "createKvsStore", "meta", "DebugCapabilities", "Settings", "makeModule", "sync", "settingsAtom", "key", "id", "schema", "defaultValue", "contributes", "prefix", "atom"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/translations.ts
|
|
4
|
+
import { translations as introspectTranslations } from "@dxos/react-ui-introspect/translations";
|
|
5
|
+
import { meta } from "#meta";
|
|
6
|
+
var translations = [
|
|
7
|
+
...introspectTranslations,
|
|
8
|
+
{
|
|
9
|
+
"en-US": {
|
|
10
|
+
[meta.id]: {
|
|
11
|
+
"plugin.name": "Debug",
|
|
12
|
+
"settings.title": "Debug settings",
|
|
13
|
+
"open-devtools.label": "Open DevTools",
|
|
14
|
+
"devtools.label": "DevTools",
|
|
15
|
+
"devtools-overview.label": "Stats",
|
|
16
|
+
"space-objects.label": "Database",
|
|
17
|
+
"debug.label": "Debug",
|
|
18
|
+
"generate-objects.label": "Generate Objects",
|
|
19
|
+
"debug-app-graph.label": "App Graph",
|
|
20
|
+
"debug-tools-explorer.label": "SDK Explorer",
|
|
21
|
+
"settings.wireframe.label": "Show wireframes.",
|
|
22
|
+
"settings.wireframe.description": "Overlay wireframe outlines on UI components for debugging layout.",
|
|
23
|
+
"settings.trace-all.label": "Trace all requests (100% sampling).",
|
|
24
|
+
"settings.trace-all.description": "Override the default 30% sampling rate to capture all traces. Requires page reload to take effect.",
|
|
25
|
+
"settings.tracing-panel.label": "Open tracing panel.",
|
|
26
|
+
"settings.tracing-panel.description": "Open the tracing dashboard to inspect captured spans.",
|
|
27
|
+
"settings.repair.label": "Run repair tool.",
|
|
28
|
+
"settings.repair.description": "Attempt to detect and fix inconsistencies in local data storage.",
|
|
29
|
+
"settings.download-diagnostics.label": "Download diagnostics.",
|
|
30
|
+
"settings.download-diagnostics.description": "Export a JSON file containing client diagnostics for troubleshooting.",
|
|
31
|
+
"settings.download-logs.label": "Download log buffer.",
|
|
32
|
+
"settings.download-logs.description": "Export the in-memory log buffer as an NDJSON file.",
|
|
33
|
+
"settings.uploaded.message": "Settings uploaded.",
|
|
34
|
+
"settings.uploaded.description": "URL copied to clipboard.",
|
|
35
|
+
"settings.choose-storage-adaptor.label": "Storage adaptor (worker reload required).",
|
|
36
|
+
"settings.choose-storage-adaptor.description": "Select the browser storage backend. Changing this requires a worker reload and may make existing data unavailable.",
|
|
37
|
+
"settings.repair-success.message": "Repair succeeded",
|
|
38
|
+
"settings.repair-failed.message": "Repair failed",
|
|
39
|
+
"settings.storage-adaptor.idb.label": "IndexedDB",
|
|
40
|
+
"settings.storage-adaptor.opfs.label": "OPFS",
|
|
41
|
+
"settings.storage-adapter.changed-alert.message": "Warning: Swapping the storage adapter will make your data unavailable.",
|
|
42
|
+
"settings.data-store.label": "Data Store",
|
|
43
|
+
"reset-data.label": "Reset data (ERASES ALL DATA)",
|
|
44
|
+
"open-debug-panel.label": "Show Debug",
|
|
45
|
+
"client.label": "Client",
|
|
46
|
+
"config.label": "Config",
|
|
47
|
+
"storage.label": "Storage",
|
|
48
|
+
"logs.label": "Logs",
|
|
49
|
+
"diagnostics.label": "Diagnostics",
|
|
50
|
+
"tracing.label": "Tracing",
|
|
51
|
+
"halo.label": "HALO",
|
|
52
|
+
"identity.label": "Identity",
|
|
53
|
+
"devices.label": "Devices",
|
|
54
|
+
"keyring.label": "Keyring",
|
|
55
|
+
"credentials.label": "Credentials",
|
|
56
|
+
"echo.label": "ECHO",
|
|
57
|
+
"spaces.label": "Spaces",
|
|
58
|
+
"space.label": "Space",
|
|
59
|
+
"feeds.label": "Feeds",
|
|
60
|
+
"objects.label": "Objects",
|
|
61
|
+
"schema.label": "Schema",
|
|
62
|
+
"registry.label": "Registry",
|
|
63
|
+
"automerge.label": "Automerge",
|
|
64
|
+
"queues.label": "Queues",
|
|
65
|
+
"members.label": "Members",
|
|
66
|
+
"metadata.label": "Metadata",
|
|
67
|
+
"mesh.label": "MESH",
|
|
68
|
+
"signal.label": "Signal",
|
|
69
|
+
"swarm.label": "Swarm",
|
|
70
|
+
"network.label": "Network",
|
|
71
|
+
"agent.label": "Agent",
|
|
72
|
+
"dashboard.label": "Dashboard",
|
|
73
|
+
"search.label": "Search",
|
|
74
|
+
"edge.label": "EDGE",
|
|
75
|
+
"workflows.label": "Workflows",
|
|
76
|
+
"traces.label": "Traces",
|
|
77
|
+
"testing.label": "Testing",
|
|
78
|
+
// GitHub (deck-companion--github surface).
|
|
79
|
+
"github-loading.message": "Loading\u2026",
|
|
80
|
+
"github-unavailable.message": "GitHub feed unavailable.",
|
|
81
|
+
"recent-prs.label_one": "{{count}} recent PR",
|
|
82
|
+
"recent-prs.label_other": "{{count}} recent PRs",
|
|
83
|
+
"view-on-github.button": "View on GitHub"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
];
|
|
88
|
+
export {
|
|
89
|
+
translations
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=translations.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\nimport { translations as introspectTranslations } from '@dxos/react-ui-introspect/translations';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n ...introspectTranslations,\n {\n 'en-US': {\n [meta.id]: {\n 'plugin.name': 'Debug',\n 'settings.title': 'Debug settings',\n 'open-devtools.label': 'Open DevTools',\n 'devtools.label': 'DevTools',\n 'devtools-overview.label': 'Stats',\n 'space-objects.label': 'Database',\n 'debug.label': 'Debug',\n 'generate-objects.label': 'Generate Objects',\n 'debug-app-graph.label': 'App Graph',\n 'debug-tools-explorer.label': 'SDK Explorer',\n\n 'settings.wireframe.label': 'Show wireframes.',\n 'settings.wireframe.description': 'Overlay wireframe outlines on UI components for debugging layout.',\n 'settings.trace-all.label': 'Trace all requests (100% sampling).',\n 'settings.trace-all.description':\n 'Override the default 30% sampling rate to capture all traces. Requires page reload to take effect.',\n 'settings.tracing-panel.label': 'Open tracing panel.',\n 'settings.tracing-panel.description': 'Open the tracing dashboard to inspect captured spans.',\n 'settings.repair.label': 'Run repair tool.',\n 'settings.repair.description': 'Attempt to detect and fix inconsistencies in local data storage.',\n 'settings.download-diagnostics.label': 'Download diagnostics.',\n 'settings.download-diagnostics.description':\n 'Export a JSON file containing client diagnostics for troubleshooting.',\n 'settings.download-logs.label': 'Download log buffer.',\n 'settings.download-logs.description': 'Export the in-memory log buffer as an NDJSON file.',\n 'settings.uploaded.message': 'Settings uploaded.',\n 'settings.uploaded.description': 'URL copied to clipboard.',\n 'settings.choose-storage-adaptor.label': 'Storage adaptor (worker reload required).',\n 'settings.choose-storage-adaptor.description':\n 'Select the browser storage backend. Changing this requires a worker reload and may make existing data unavailable.',\n 'settings.repair-success.message': 'Repair succeeded',\n 'settings.repair-failed.message': 'Repair failed',\n\n 'settings.storage-adaptor.idb.label': 'IndexedDB',\n 'settings.storage-adaptor.opfs.label': 'OPFS',\n 'settings.storage-adapter.changed-alert.message':\n 'Warning: Swapping the storage adapter will make your data unavailable.',\n\n 'settings.data-store.label': 'Data Store',\n\n 'reset-data.label': 'Reset data (ERASES ALL DATA)',\n 'open-debug-panel.label': 'Show Debug',\n 'client.label': 'Client',\n 'config.label': 'Config',\n 'storage.label': 'Storage',\n 'logs.label': 'Logs',\n 'diagnostics.label': 'Diagnostics',\n 'tracing.label': 'Tracing',\n 'halo.label': 'HALO',\n 'identity.label': 'Identity',\n 'devices.label': 'Devices',\n 'keyring.label': 'Keyring',\n 'credentials.label': 'Credentials',\n 'echo.label': 'ECHO',\n 'spaces.label': 'Spaces',\n 'space.label': 'Space',\n 'feeds.label': 'Feeds',\n 'objects.label': 'Objects',\n 'schema.label': 'Schema',\n 'registry.label': 'Registry',\n 'automerge.label': 'Automerge',\n 'queues.label': 'Queues',\n 'members.label': 'Members',\n 'metadata.label': 'Metadata',\n 'mesh.label': 'MESH',\n 'signal.label': 'Signal',\n 'swarm.label': 'Swarm',\n 'network.label': 'Network',\n 'agent.label': 'Agent',\n 'dashboard.label': 'Dashboard',\n 'search.label': 'Search',\n 'edge.label': 'EDGE',\n 'workflows.label': 'Workflows',\n 'traces.label': 'Traces',\n 'testing.label': 'Testing',\n // GitHub (deck-companion--github surface).\n 'github-loading.message': 'Loading…',\n 'github-unavailable.message': 'GitHub feed unavailable.',\n 'recent-prs.label_one': '{{count}} recent PR',\n 'recent-prs.label_other': '{{count}} recent PRs',\n 'view-on-github.button': 'View on GitHub',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
+
"mappings": ";;;AAKA,SAASA,gBAAgBC,8BAA8B;AAEvD,SAASC,YAAY;AAEd,IAAMF,eAAe;KACvBC;EACH;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,kBAAkB;QAClB,uBAAuB;QACvB,kBAAkB;QAClB,2BAA2B;QAC3B,uBAAuB;QACvB,eAAe;QACf,0BAA0B;QAC1B,yBAAyB;QACzB,8BAA8B;QAE9B,4BAA4B;QAC5B,kCAAkC;QAClC,4BAA4B;QAC5B,kCACE;QACF,gCAAgC;QAChC,sCAAsC;QACtC,yBAAyB;QACzB,+BAA+B;QAC/B,uCAAuC;QACvC,6CACE;QACF,gCAAgC;QAChC,sCAAsC;QACtC,6BAA6B;QAC7B,iCAAiC;QACjC,yCAAyC;QACzC,+CACE;QACF,mCAAmC;QACnC,kCAAkC;QAElC,sCAAsC;QACtC,uCAAuC;QACvC,kDACE;QAEF,6BAA6B;QAE7B,oBAAoB;QACpB,0BAA0B;QAC1B,gBAAgB;QAChB,gBAAgB;QAChB,iBAAiB;QACjB,cAAc;QACd,qBAAqB;QACrB,iBAAiB;QACjB,cAAc;QACd,kBAAkB;QAClB,iBAAiB;QACjB,iBAAiB;QACjB,qBAAqB;QACrB,cAAc;QACd,gBAAgB;QAChB,eAAe;QACf,eAAe;QACf,iBAAiB;QACjB,gBAAgB;QAChB,kBAAkB;QAClB,mBAAmB;QACnB,gBAAgB;QAChB,iBAAiB;QACjB,kBAAkB;QAClB,cAAc;QACd,gBAAgB;QAChB,eAAe;QACf,iBAAiB;QACjB,eAAe;QACf,mBAAmB;QACnB,gBAAgB;QAChB,cAAc;QACd,mBAAmB;QACnB,gBAAgB;QAChB,iBAAiB;;QAEjB,0BAA0B;QAC1B,8BAA8B;QAC9B,wBAAwB;QACxB,0BAA0B;QAC1B,yBAAyB;MAC3B;IACF;EACF;;",
|
|
6
|
+
"names": ["translations", "introspectTranslations", "meta", "id"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DebugCapabilities,
|
|
3
|
+
DebugContext,
|
|
4
|
+
Devtools,
|
|
5
|
+
Settings_exports
|
|
6
|
+
} from "../chunk-UAAGABXZ.mjs";
|
|
7
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
8
|
+
export {
|
|
9
|
+
DebugCapabilities,
|
|
10
|
+
DebugContext,
|
|
11
|
+
Devtools,
|
|
12
|
+
Settings_exports as Settings
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.mjs.map
|