@dxos/plugin-debug 0.11.1 → 0.12.0-next-2800d0376abcc62d5544afdd744b16b2b960434e
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/dist/lib/Debug.mjs +13 -0
- package/dist/lib/Debug.mjs.map +1 -0
- package/dist/lib/DebugEvents.mjs +15 -0
- package/dist/lib/DebugEvents.mjs.map +1 -0
- package/dist/lib/DebugNodes.mjs +19 -0
- package/dist/lib/DebugNodes.mjs.map +1 -0
- package/dist/lib/DebugOperation.mjs +27 -0
- package/dist/lib/DebugOperation.mjs.map +1 -0
- package/dist/lib/DebugPlugin.mjs +13 -26
- package/dist/lib/DebugPlugin.mjs.map +1 -1
- package/dist/lib/DebugSurface.mjs +15 -0
- package/dist/lib/DebugSurface.mjs.map +1 -0
- package/dist/lib/Settings.mjs +13 -0
- package/dist/lib/Settings.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +57 -7
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/capabilities.node.mjs +37 -0
- package/dist/lib/capabilities.node.mjs.map +1 -0
- package/dist/lib/capabilities.workerd.mjs +32 -0
- package/dist/lib/capabilities.workerd.mjs.map +1 -0
- package/dist/lib/chunk-DebugObjectPanel.mjs +4 -3
- package/dist/lib/chunk-DebugObjectPanel.mjs.map +1 -1
- package/dist/lib/chunk-DebugSettings.mjs +101 -17
- package/dist/lib/chunk-DebugSettings.mjs.map +1 -1
- package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs +1 -1
- package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs.map +1 -1
- package/dist/lib/chunk-LogStatus.mjs +1 -1
- package/dist/lib/chunk-LogStatus.mjs.map +1 -1
- package/dist/lib/chunk-SpaceGenerator.mjs +159 -77
- package/dist/lib/chunk-SpaceGenerator.mjs.map +1 -1
- package/dist/lib/chunk-StatsPanel.mjs +8 -6
- package/dist/lib/chunk-StatsPanel.mjs.map +1 -1
- package/dist/lib/chunk-Wireframe.mjs +8 -5
- package/dist/lib/chunk-Wireframe.mjs.map +1 -1
- package/dist/lib/chunk-app-graph-builder.mjs +20 -15
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-insert-lorem-ipsum.mjs +31 -0
- package/dist/lib/chunk-insert-lorem-ipsum.mjs.map +1 -0
- package/dist/lib/chunk-log-recording.mjs +4 -3
- package/dist/lib/chunk-log-recording.mjs.map +1 -1
- package/dist/lib/chunk-markdown-menu.mjs +29 -0
- package/dist/lib/chunk-markdown-menu.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +12 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +31 -25
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
- package/dist/lib/chunk-settings.mjs +4 -4
- package/dist/lib/chunk-settings.mjs.map +1 -1
- package/dist/lib/chunk-stats-panel.mjs +6 -5
- package/dist/lib/chunk-stats-panel.mjs.map +1 -1
- package/dist/lib/components.mjs +135 -87
- package/dist/lib/components.mjs.map +1 -1
- package/dist/lib/index.mjs +4 -3
- package/dist/lib/meta.mjs +35 -1
- package/dist/lib/meta.mjs.map +1 -0
- package/dist/lib/operations.mjs +11 -0
- package/dist/lib/operations.mjs.map +1 -0
- package/dist/lib/plugin.mjs +6 -5
- package/dist/lib/plugin.mjs.map +1 -1
- package/dist/lib/translations.mjs +21 -1
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/lib/types.mjs +7 -2
- package/dist/types/src/DebugPlugin.d.ts +37 -4
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/DebugSurfaces.d.ts +1 -1
- package/dist/types/src/capabilities/DebugSurfaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/node.d.ts +12 -0
- package/dist/types/src/capabilities/gen/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts +12 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +11 -10
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/log-recording.d.ts +1 -2
- package/dist/types/src/capabilities/log-recording.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown-menu.d.ts +12 -0
- package/dist/types/src/capabilities/markdown-menu.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +5 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +2 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/stats-panel.d.ts +2 -2
- package/dist/types/src/capabilities/stats-panel.d.ts.map +1 -1
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
- package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.d.ts +13 -0
- package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.stories.d.ts +105 -0
- package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPortSettings/index.d.ts +2 -0
- package/dist/types/src/containers/DebugPortSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts +1 -1
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts +24 -6
- package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.stories.d.ts +100 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.stories.d.ts.map +1 -0
- package/dist/types/src/containers/StatsPanel/StatsPanel.d.ts.map +1 -1
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/DebugOperationHandlerSet.d.ts +3 -0
- package/dist/types/src/operations/DebugOperationHandlerSet.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +2 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/insert-lorem-ipsum.d.ts +5 -0
- package/dist/types/src/operations/insert-lorem-ipsum.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -3
- package/dist/types/src/plugin.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +24 -3
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Debug.d.ts +14 -0
- package/dist/types/src/types/Debug.d.ts.map +1 -0
- package/dist/types/src/types/DebugEvents.d.ts +8 -0
- package/dist/types/src/types/DebugEvents.d.ts.map +1 -0
- package/dist/types/src/types/DebugOperation.d.ts +11 -0
- package/dist/types/src/types/DebugOperation.d.ts.map +1 -0
- package/dist/types/src/types/DebugSurface.d.ts +1 -1
- package/dist/types/src/types/DebugSurface.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +4 -4
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +132 -73
- package/src/DebugPlugin.ts +17 -0
- package/src/capabilities/DebugSurfaces.tsx +9 -5
- package/src/capabilities/app-graph-builder.ts +18 -13
- package/src/capabilities/gen/node.ts +55 -0
- package/src/capabilities/gen/workerd.ts +46 -0
- package/src/capabilities/index.ts +61 -6
- package/src/capabilities/log-recording.ts +6 -3
- package/src/capabilities/markdown-menu.ts +32 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.ts +9 -8
- package/src/capabilities/settings.ts +5 -5
- package/src/capabilities/stats-panel.ts +6 -5
- package/src/components/SchemaTable/SchemaTable.tsx +19 -13
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +21 -22
- package/src/components/SpaceGenerator/presets.ts +137 -115
- package/src/containers/DebugPortSettings/DebugPortSettings.stories.tsx +144 -0
- package/src/containers/DebugPortSettings/DebugPortSettings.tsx +112 -0
- package/src/containers/DebugPortSettings/index.ts +5 -0
- package/src/containers/DebugSettings/DebugSettings.tsx +15 -10
- package/src/containers/SpaceGenerator/SpaceGenerator.stories.tsx +112 -0
- package/src/containers/SpaceGenerator/SpaceGenerator.tsx +181 -69
- package/src/containers/StatsPanel/StatsPanel.tsx +6 -5
- package/src/containers/Wireframe/Wireframe.tsx +5 -5
- package/src/index.ts +3 -2
- package/src/meta.ts +1 -1
- package/src/operations/DebugOperationHandlerSet.ts +12 -0
- package/src/operations/index.ts +5 -0
- package/src/operations/insert-lorem-ipsum.ts +33 -0
- package/src/plugin.tsx +34 -0
- package/src/translations.ts +27 -0
- package/src/types/Debug.ts +25 -0
- package/src/types/DebugEvents.ts +16 -0
- package/src/types/DebugOperation.ts +30 -0
- package/src/types/DebugSurface.ts +1 -1
- package/src/types/Settings.ts +5 -6
- package/src/types/index.ts +3 -1
- package/dist/lib/DebugPlugin.node.mjs +0 -10
- package/dist/lib/DebugPlugin.node.mjs.map +0 -1
- package/dist/lib/DebugPlugin.workerd.mjs +0 -8
- package/dist/lib/DebugPlugin.workerd.mjs.map +0 -1
- package/dist/lib/chunk-meta.mjs +0 -36
- package/dist/lib/chunk-meta.mjs.map +0 -1
- package/dist/lib/chunk-types.mjs +0 -60
- package/dist/lib/chunk-types.mjs.map +0 -1
- package/dist/types/src/DebugPlugin.node.d.ts +0 -5
- package/dist/types/src/DebugPlugin.node.d.ts.map +0 -1
- package/dist/types/src/DebugPlugin.workerd.d.ts +0 -5
- package/dist/types/src/DebugPlugin.workerd.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/draw-util.d.ts +0 -8
- package/dist/types/src/components/SpaceGenerator/draw-util.d.ts.map +0 -1
- package/dist/types/src/types/debug.d.ts +0 -22
- package/dist/types/src/types/debug.d.ts.map +0 -1
- package/src/DebugPlugin.node.ts +0 -18
- package/src/DebugPlugin.tsx +0 -41
- package/src/DebugPlugin.workerd.ts +0 -12
- package/src/components/SpaceGenerator/draw-util.ts +0 -191
- package/src/plugin.ts +0 -10
- package/src/types/debug.ts +0 -37
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
3
|
+
import { meta } from "#meta";
|
|
4
|
+
//#region src/types/Debug.ts
|
|
5
|
+
var Debug_exports = /* @__PURE__ */ __exportAll({ DebugCapabilities: () => DebugCapabilities });
|
|
6
|
+
var DebugCapabilities;
|
|
7
|
+
(function(_DebugCapabilities) {
|
|
8
|
+
_DebugCapabilities.Settings = Capability.makeSingleton()(`${meta.profile.key}.capability.settings`);
|
|
9
|
+
})(DebugCapabilities || (DebugCapabilities = {}));
|
|
10
|
+
//#endregion
|
|
11
|
+
export { DebugCapabilities, Debug_exports as t };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=Debug.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Debug.mjs","names":[],"sources":["../../src/types/Debug.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport { type IdbLogStore } from '@dxos/log-store-idb';\n\nimport { meta } from '#meta';\n\nimport * as Settings from './Settings';\n\nexport type DebugPluginOptions = {\n /** Shared persistent log store for capturing and downloading logs. */\n logStore?: IdbLogStore;\n /** Persist the stats-panel store to localStorage so it survives a reload. Defaults to `true`. */\n persistStats?: boolean;\n};\n\nexport namespace DebugCapabilities {\n export const Settings = Capability.makeSingleton<Atom.Writable<Settings.Settings>>()(\n `${meta.profile.key}.capability.settings`,\n );\n}\n"],"mappings":";;;;;AAoBO,IAAU;CAAV,SAAA,oBAAA;CACQ,mBAAA,WAAW,WAAW,cAAgD,CAAC,CAClF,GAAG,KAAK,QAAQ,IAAI,qBACtB;AACF,EAAA,CAAA,sBAAA,oBAAA,CAAA,EAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import { meta } from "#meta";
|
|
3
|
+
import * as ActivationEvent from "@dxos/app-framework/ActivationEvent";
|
|
4
|
+
//#region src/types/DebugEvents.ts
|
|
5
|
+
var DebugEvents_exports = /* @__PURE__ */ __exportAll({ Start: () => Start });
|
|
6
|
+
/**
|
|
7
|
+
* The feature's start event: the plugin's start-gated modules (and cross-plugin
|
|
8
|
+
* contributions consumed by this feature) activate here. Fired on demand and by the
|
|
9
|
+
* host's idle trickle.
|
|
10
|
+
*/
|
|
11
|
+
var Start = ActivationEvent.pluginStart(meta.profile.key);
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Start, DebugEvents_exports as t };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=DebugEvents.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugEvents.mjs","names":[],"sources":["../../src/types/DebugEvents.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as ActivationEvent from '@dxos/app-framework/ActivationEvent';\n\nimport { meta } from '#meta';\n\n/**\n * The feature's start event: the plugin's start-gated modules (and cross-plugin\n * contributions consumed by this feature) activate here. Fired on demand and by the\n * host's idle trickle.\n */\nexport const Start = ActivationEvent.pluginStart(meta.profile.key);\n"],"mappings":";;;;;;;;;;AAeA,IAAa,QAAQ,gBAAgB,YAAY,KAAK,QAAQ,GAAG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import { meta } from "#meta";
|
|
3
|
+
//#region src/types/DebugNodes.ts
|
|
4
|
+
var DebugNodes_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
SpaceType: () => SpaceType,
|
|
6
|
+
id: () => id,
|
|
7
|
+
nodeId: () => nodeId
|
|
8
|
+
});
|
|
9
|
+
/** Extracts the last dot-separated segment of a namespaced ID string for use as a node segment id. */
|
|
10
|
+
var nodeId = (fullId) => fullId.split(".").at(-1) ?? "";
|
|
11
|
+
var debugId = meta.profile.key;
|
|
12
|
+
/** Top-level Debug node (sibling of DevTools under the SYSTEM navtree group). */
|
|
13
|
+
var id = `${debugId}.debug`;
|
|
14
|
+
/** Discriminator for the space-generator article surface (`node.data.type`). */
|
|
15
|
+
var SpaceType = `${debugId}.space`;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { SpaceType, id, nodeId, DebugNodes_exports as t };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=DebugNodes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugNodes.mjs","names":[],"sources":["../../src/types/DebugNodes.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { meta } from '#meta';\n\n/** Extracts the last dot-separated segment of a namespaced ID string for use as a node segment id. */\nexport const nodeId = (fullId: string): string => fullId.split('.').at(-1) ?? '';\n\nconst debugId = meta.profile.key;\n\n/** Top-level Debug node (sibling of DevTools under the SYSTEM navtree group). */\nexport const id = `${debugId}.debug`;\n\n/** Discriminator for the space-generator article surface (`node.data.type`). */\nexport const SpaceType = `${debugId}.space`;\n"],"mappings":";;;;;;;;;AASA,IAAa,UAAU,WAA2B,OAAO,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK;AAE9E,IAAM,UAAU,KAAK,QAAQ;;AAG7B,IAAa,KAAK,GAAG,QAAQ;;AAG7B,IAAa,YAAY,GAAG,QAAQ"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
3
|
+
import { DXN } from "@dxos/echo";
|
|
4
|
+
import * as Schema from "effect/Schema";
|
|
5
|
+
import * as Operation from "@dxos/compute/Operation";
|
|
6
|
+
import * as MarkdownOperation from "@dxos/plugin-markdown/MarkdownOperation";
|
|
7
|
+
//#region src/types/DebugOperation.ts
|
|
8
|
+
var DebugOperation_exports = /* @__PURE__ */ __exportAll({ InsertLoremIpsum: () => InsertLoremIpsum });
|
|
9
|
+
/**
|
|
10
|
+
* Fills the document with placeholder prose from the slash menu — the cheapest way to get a
|
|
11
|
+
* realistic amount of text in front of a layout or scrolling bug.
|
|
12
|
+
*/
|
|
13
|
+
var InsertLoremIpsum = Operation.make({
|
|
14
|
+
meta: {
|
|
15
|
+
key: DXN.make("org.dxos.operation.debug.insertLoremIpsum"),
|
|
16
|
+
name: "Lorem ipsum",
|
|
17
|
+
description: "Inserts a paragraph of placeholder text at the cursor.",
|
|
18
|
+
icon: "ph--text-align-left--regular"
|
|
19
|
+
},
|
|
20
|
+
input: MarkdownOperation.EditorCommandInput,
|
|
21
|
+
output: Schema.Void,
|
|
22
|
+
services: [Capability.Service]
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { InsertLoremIpsum, DebugOperation_exports as t };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=DebugOperation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugOperation.mjs","names":[],"sources":["../../src/types/DebugOperation.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as Operation from '@dxos/compute/Operation';\nimport { DXN } from '@dxos/echo';\nimport * as MarkdownOperation from '@dxos/plugin-markdown/MarkdownOperation';\n\n/**\n * Fills the document with placeholder prose from the slash menu — the cheapest way to get a\n * realistic amount of text in front of a layout or scrolling bug.\n */\nexport const InsertLoremIpsum = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.debug.insertLoremIpsum'),\n name: 'Lorem ipsum',\n description: 'Inserts a paragraph of placeholder text at the cursor.',\n icon: 'ph--text-align-left--regular',\n },\n input: MarkdownOperation.EditorCommandInput,\n output: Schema.Void,\n // The handler resolves the live EditorView from a capability, which is the only route from the\n // operation layer to the editor.\n services: [Capability.Service],\n});\n"],"mappings":";;;;;;;;;;;;AAiBA,IAAa,mBAAmB,UAAU,KAAK;CAC7C,MAAM;EACJ,KAAK,IAAI,KAAK,2CAA2C;EACzD,MAAM;EACN,aAAa;EACb,MAAM;CACR;CACA,OAAO,kBAAkB;CACzB,QAAQ,OAAO;CAGf,UAAU,CAAC,WAAW,OAAO;AAC/B,CAAC"}
|
package/dist/lib/DebugPlugin.mjs
CHANGED
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { meta } from "#meta";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import { meta as meta$1 } from "#meta";
|
|
3
|
+
import * as Plugin from "@dxos/app-framework/Plugin";
|
|
4
|
+
//#region src/DebugPlugin.ts
|
|
5
|
+
var DebugPlugin_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
make: () => make,
|
|
7
|
+
meta: () => meta
|
|
8
|
+
});
|
|
9
|
+
/** Plugin metadata, available without loading the plugin body. */
|
|
10
|
+
var meta = meta$1;
|
|
11
|
+
/** Constructs the plugin; the body loads on first enable. */
|
|
12
|
+
var make = Plugin.lazy(meta, () => import("#plugin"));
|
|
6
13
|
//#endregion
|
|
7
|
-
|
|
8
|
-
var DebugPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }), AppPlugin.addSettingsModule({ activate: DebugSettings }), Plugin.addModule(({ logStore }) => ({
|
|
9
|
-
id: Capability.getModuleTag(ReactSurface) ?? "surfaces",
|
|
10
|
-
activatesOn: ActivationEvents.SetupReactSurface,
|
|
11
|
-
activate: () => ReactSurface({ logStore })
|
|
12
|
-
})), Plugin.addModule({
|
|
13
|
-
id: "log-recording",
|
|
14
|
-
activatesOn: ActivationEvents.Startup,
|
|
15
|
-
activate: LogRecording
|
|
16
|
-
}), AppPlugin.addTranslationsModule({ translations }), Plugin.addModule(({ persistStats }) => ({
|
|
17
|
-
id: "stats-panel",
|
|
18
|
-
activatesOn: ActivationEvents.Startup,
|
|
19
|
-
activate: () => StatsPanel({ persist: persistStats ?? true })
|
|
20
|
-
})), AppPlugin.addPluginAssetModule({ asset: {
|
|
21
|
-
pluginId: meta.profile.key,
|
|
22
|
-
path: "PLUGIN.mdl",
|
|
23
|
-
content: "---\nid: org.dxos.plugin.debug\nname: DebugPlugin\nversion: 0.1.0\n---\n\nDeveloper debugging utilities for `DXOS` Composer — synthetic-object generation, a per-object Debug companion, a space-objects browser, a wireframe overlay, and a transient-stats panel. Rendered under a Debug node in the SYSTEM navigation group, a sibling of the Devtools inspector (`org.dxos.plugin.devtools`).\n\n## Extensions\n\nThe following extension dialects are used in this document.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n\n## Types\n\n```mdl\ntype Settings\n fields:\n wireframe?: boolean # overlay every article/section surface with a labelled border\n traceAll?: boolean # enable verbose operation tracing across all plugins\n```\n\n```mdl\ntype DebugPluginOptions\n fields:\n logStore?: IdbLogStore # shared persistent log store for capturing and downloading logs\n persistStats?: boolean # persist the stats-panel store to localStorage (default true)\n```\n\n## Features\n\n```mdl\nfeat GenerateObjects\n desc: Create configurable batches of synthetic ECHO objects into a space collection.\n```\n\n```mdl\nfeat ObjectDebugCompanion\n desc: A Debug companion tab on every ECHO object exposing raw field values and DXNs.\n```\n\n```mdl\nfeat SpaceObjectsBrowser\n desc: A deck companion listing all objects in the active space with live reactive updates.\n```\n\n```mdl\nfeat Wireframe\n desc: Overlay labelled borders around every article and section surface.\n```\n\n```mdl\nfeat StatsPanel\n desc: A transient-stats panel rendering the shared telemetry store.\n```\n",
|
|
24
|
-
mimeType: "application/x-mdl"
|
|
25
|
-
} }), Plugin.make);
|
|
26
|
-
//#endregion
|
|
27
|
-
export { DebugPlugin, DebugPlugin as default };
|
|
14
|
+
export { make, meta, DebugPlugin_exports as t };
|
|
28
15
|
|
|
29
16
|
//# sourceMappingURL=DebugPlugin.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DebugPlugin.mjs","names":[],"sources":["../../src/DebugPlugin.
|
|
1
|
+
{"version":3,"file":"DebugPlugin.mjs","names":[],"sources":["../../src/DebugPlugin.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\n\nimport { meta as pluginMeta } from '#meta';\n\n/** Plugin metadata, available without loading the plugin body. */\nexport const meta = pluginMeta;\n\n/** Constructs the plugin; the body loads on first enable. */\nexport const make = Plugin.lazy(meta, () => import('#plugin'));\n\nexport type { DebugPluginOptions } from './types/Debug';\n"],"mappings":";;;;;;;;;AAWA,IAAa,OAAO;;AAGpB,IAAa,OAAO,OAAO,KAAK,YAAY,OAAO,UAAU"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import { meta } from "#meta";
|
|
3
|
+
import * as Role from "@dxos/app-framework/Role";
|
|
4
|
+
//#region src/types/DebugSurface.ts
|
|
5
|
+
var DebugSurface_exports = /* @__PURE__ */ __exportAll({ Stats: () => Stats });
|
|
6
|
+
/**
|
|
7
|
+
* Role token for the transient-stats panel — renders the {@link AppCapabilities.StatsPanel} store
|
|
8
|
+
* (arbitrary reactive telemetry keyed by owner id). A layout targets this role (role-only dispatch);
|
|
9
|
+
* the surface reads the store directly, so it needs no subject.
|
|
10
|
+
*/
|
|
11
|
+
var Stats = Role.make(`${meta.profile.key}.surface.stats`);
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Stats, DebugSurface_exports as t };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=DebugSurface.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugSurface.mjs","names":[],"sources":["../../src/types/DebugSurface.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Role from '@dxos/app-framework/Role';\n\nimport { meta } from '#meta';\n\n/**\n * Role token for the transient-stats panel — renders the {@link AppCapabilities.StatsPanel} store\n * (arbitrary reactive telemetry keyed by owner id). A layout targets this role (role-only dispatch);\n * the surface reads the store directly, so it needs no subject.\n */\nexport const Stats = Role.make<Record<string, unknown>>(`${meta.profile.key}.surface.stats`);\n"],"mappings":";;;;;;;;;;AAeA,IAAa,QAAQ,KAAK,KAA8B,GAAG,KAAK,QAAQ,IAAI,eAAe"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
import * as Struct from "effect/Struct";
|
|
4
|
+
//#region src/types/Settings.ts
|
|
5
|
+
var Settings_exports = /* @__PURE__ */ __exportAll({ Settings: () => Settings });
|
|
6
|
+
var Settings = Schema.Struct({
|
|
7
|
+
wireframe: Schema.optional(Schema.Boolean),
|
|
8
|
+
traceAll: Schema.optional(Schema.Boolean)
|
|
9
|
+
}).mapFields(Struct.map(Schema.mutableKey));
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Settings, Settings_exports as t };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=Settings.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Settings.mjs","names":[],"sources":["../../src/types/Settings.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\nimport * as Struct from 'effect/Struct';\n\nexport const Settings = Schema.Struct({\n wireframe: Schema.optional(Schema.Boolean),\n traceAll: Schema.optional(Schema.Boolean),\n}).mapFields(Struct.map(Schema.mutableKey));\n\nexport interface Settings extends Schema.Schema.Type<typeof Settings> {}\n"],"mappings":";;;;;AASA,IAAa,WAAW,OAAO,OAAO;CACpC,WAAW,OAAO,SAAS,OAAO,OAAO;CACzC,UAAU,OAAO,SAAS,OAAO,OAAO;AAC1C,CAAC,CAAC,CAAC,UAAU,OAAO,IAAI,OAAO,UAAU,CAAC"}
|
|
@@ -1,11 +1,61 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Capabilities from "@dxos/app-framework/Capabilities";
|
|
2
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
3
|
+
import * as AppCapabilities from "@dxos/app-toolkit/AppCapabilities";
|
|
4
|
+
import * as AppCapability from "@dxos/app-toolkit/AppCapability";
|
|
5
|
+
import * as MarkdownCapabilities from "@dxos/plugin-markdown/MarkdownCapabilities";
|
|
6
|
+
import { translations } from "#translations";
|
|
7
|
+
import { Debug, DebugEvents } from "#types";
|
|
8
|
+
import * as ActivationEvents from "@dxos/app-framework/ActivationEvents";
|
|
9
|
+
import { meta } from "#meta";
|
|
10
|
+
//#region PLUGIN.mdl?raw
|
|
11
|
+
var PLUGIN_default = "---\nid: org.dxos.plugin.debug\nname: DebugPlugin\nversion: 0.1.0\n---\n\nDeveloper debugging utilities for `DXOS` Composer — synthetic-object generation, a per-object Debug companion, a space-objects browser, a wireframe overlay, and a transient-stats panel. Rendered under a Debug node in the SYSTEM navigation group, a sibling of the Devtools inspector (`org.dxos.plugin.devtools`).\n\n## Extensions\n\nThe following extension dialects are used in this document.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n\n## Types\n\n```mdl\ntype Settings\n fields:\n wireframe?: boolean # overlay every article/section surface with a labelled border\n traceAll?: boolean # enable verbose operation tracing across all plugins\n```\n\n```mdl\ntype DebugPluginOptions\n fields:\n logStore?: IdbLogStore # shared persistent log store for capturing and downloading logs\n persistStats?: boolean # persist the stats-panel store to localStorage (default true)\n```\n\n## Features\n\n```mdl\nfeat GenerateObjects\n desc: Create configurable batches of synthetic ECHO objects into a space collection.\n```\n\n```mdl\nfeat ObjectDebugCompanion\n desc: A Debug companion tab on every ECHO object exposing raw field values and DXNs.\n```\n\n```mdl\nfeat SpaceObjectsBrowser\n desc: A deck companion listing all objects in the active space with live reactive updates.\n```\n\n```mdl\nfeat Wireframe\n desc: Overlay labelled borders around every article and section surface.\n```\n\n```mdl\nfeat StatsPanel\n desc: A transient-stats panel rendering the shared telemetry store.\n```\n";
|
|
12
|
+
//#endregion
|
|
2
13
|
//#region src/capabilities/index.ts
|
|
3
|
-
var AppGraphBuilder =
|
|
4
|
-
var ReactSurface =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
14
|
+
var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"), { environments: ["node"] });
|
|
15
|
+
var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs"), {
|
|
16
|
+
roles: [
|
|
17
|
+
"org.dxos.plugin.debug.surface.stats",
|
|
18
|
+
"org.dxos.role.article",
|
|
19
|
+
"org.dxos.role.deckCompanion.logs",
|
|
20
|
+
"org.dxos.role.deckCompanion.spaceObjects",
|
|
21
|
+
"org.dxos.role.section",
|
|
22
|
+
"org.dxos.role.statusIndicator"
|
|
23
|
+
],
|
|
24
|
+
requires: [
|
|
25
|
+
Capabilities.AtomRegistry,
|
|
26
|
+
Debug.DebugCapabilities.Settings,
|
|
27
|
+
AppCapabilities.FileUploader
|
|
28
|
+
],
|
|
29
|
+
props: ({ logStore }) => ({ logStore })
|
|
30
|
+
});
|
|
31
|
+
var DebugSettings = AppCapability.settings(() => import("./chunk-settings.mjs"), {
|
|
32
|
+
activatesOn: ActivationEvents.Idle,
|
|
33
|
+
provides: [Debug.DebugCapabilities.Settings],
|
|
34
|
+
environments: ["node"]
|
|
35
|
+
});
|
|
36
|
+
var StatsPanel = Capability.lazyModule("StatsPanel", {
|
|
37
|
+
requires: [Capabilities.AtomRegistry],
|
|
38
|
+
provides: [AppCapabilities.StatsPanel],
|
|
39
|
+
props: ({ persistStats }) => ({ persist: persistStats ?? true }),
|
|
40
|
+
activatesOn: DebugEvents.Start
|
|
41
|
+
}, () => import("./chunk-stats-panel.mjs"));
|
|
42
|
+
var OperationHandler = AppCapability.operationHandler(() => import("./chunk-operation-handler.mjs"));
|
|
43
|
+
var MarkdownMenu = Capability.lazyModule("MarkdownMenu", {
|
|
44
|
+
provides: [MarkdownCapabilities.MenuExtension],
|
|
45
|
+
activatesOn: DebugEvents.Start
|
|
46
|
+
}, () => import("./chunk-markdown-menu.mjs"));
|
|
47
|
+
var LogRecording = Capability.lazyModule("LogRecording", {
|
|
48
|
+
provides: [],
|
|
49
|
+
activatesOn: DebugEvents.Start
|
|
50
|
+
}, () => import("./chunk-log-recording.mjs"));
|
|
51
|
+
var Translations = AppCapability.translations(translations);
|
|
52
|
+
var PluginAsset = AppCapability.pluginAsset({
|
|
53
|
+
pluginId: meta.profile.key,
|
|
54
|
+
path: "PLUGIN.mdl",
|
|
55
|
+
content: PLUGIN_default,
|
|
56
|
+
mimeType: "application/x-mdl"
|
|
57
|
+
});
|
|
8
58
|
//#endregion
|
|
9
|
-
export { AppGraphBuilder, DebugSettings, LogRecording, ReactSurface, StatsPanel };
|
|
59
|
+
export { AppGraphBuilder, DebugSettings, LogRecording, MarkdownMenu, OperationHandler, PluginAsset, ReactSurface, StatsPanel, Translations };
|
|
10
60
|
|
|
11
61
|
//# sourceMappingURL=capabilities.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport
|
|
1
|
+
{"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { Debug, DebugEvents } from '#types';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../../PLUGIN.mdl?raw';\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder'), {\n environments: ['node'],\n});\nexport const ReactSurface = AppCapability.surface(() => import('./react-surface'), {\n roles: [\n 'org.dxos.plugin.debug.surface.stats',\n 'org.dxos.role.article',\n 'org.dxos.role.deckCompanion.logs',\n 'org.dxos.role.deckCompanion.spaceObjects',\n 'org.dxos.role.section',\n 'org.dxos.role.statusIndicator',\n ],\n requires: [Capabilities.AtomRegistry, Debug.DebugCapabilities.Settings, AppCapabilities.FileUploader],\n props: ({ logStore }: Debug.DebugPluginOptions) => ({ logStore }),\n});\nexport const DebugSettings = AppCapability.settings(() => import('./settings'), {\n activatesOn: ActivationEvents.Idle,\n provides: [Debug.DebugCapabilities.Settings],\n environments: ['node'],\n});\nexport const StatsPanel = Capability.lazyModule(\n 'StatsPanel',\n {\n requires: [Capabilities.AtomRegistry],\n provides: [AppCapabilities.StatsPanel],\n props: ({ persistStats }: Debug.DebugPluginOptions) => ({ persist: persistStats ?? true }),\n activatesOn: DebugEvents.Start,\n },\n () => import('./stats-panel'),\n);\nexport const OperationHandler = AppCapability.operationHandler(() => import('./operation-handler'));\nexport const MarkdownMenu = Capability.lazyModule(\n 'MarkdownMenu',\n { provides: [MarkdownCapabilities.MenuExtension], activatesOn: DebugEvents.Start },\n () => import('./markdown-menu'),\n);\nexport const LogRecording = Capability.lazyModule(\n 'LogRecording',\n { provides: [], activatesOn: DebugEvents.Start },\n () => import('./log-recording'),\n);\nexport const Translations = AppCapability.translations(translations);\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: pluginSpec,\n mimeType: 'application/x-mdl',\n});\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAAwB,EAChG,cAAc,CAAC,MAAM,EACvB,CAAC;AACD,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAoB;CACjF,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EAAC,aAAa;EAAc,MAAM,kBAAkB;EAAU,gBAAgB;CAAY;CACpG,QAAQ,EAAE,gBAA0C,EAAE,SAAS;AACjE,CAAC;AACD,IAAa,gBAAgB,cAAc,eAAe,OAAO,yBAAe;CAC9E,aAAa,iBAAiB;CAC9B,UAAU,CAAC,MAAM,kBAAkB,QAAQ;CAC3C,cAAc,CAAC,MAAM;AACvB,CAAC;AACD,IAAa,aAAa,WAAW,WACnC,cACA;CACE,UAAU,CAAC,aAAa,YAAY;CACpC,UAAU,CAAC,gBAAgB,UAAU;CACrC,QAAQ,EAAE,oBAA8C,EAAE,SAAS,gBAAgB,KAAK;CACxF,aAAa,YAAY;AAC3B,SACM,OAAO,0BACf;AACA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,gCAAsB;AAClG,IAAa,eAAe,WAAW,WACrC,gBACA;CAAE,UAAU,CAAC,qBAAqB,aAAa;CAAG,aAAa,YAAY;AAAM,SAC3E,OAAO,4BACf;AACA,IAAa,eAAe,WAAW,WACrC,gBACA;CAAE,UAAU,CAAC;CAAG,aAAa,YAAY;AAAM,SACzC,OAAO,4BACf;AACA,IAAa,eAAe,cAAc,aAAa,YAAY;AACnE,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as Capabilities from "@dxos/app-framework/Capabilities";
|
|
2
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
3
|
+
import * as AppCapabilities from "@dxos/app-toolkit/AppCapabilities";
|
|
4
|
+
import * as AppCapability from "@dxos/app-toolkit/AppCapability";
|
|
5
|
+
import * as MarkdownCapabilities from "@dxos/plugin-markdown/MarkdownCapabilities";
|
|
6
|
+
import { translations } from "#translations";
|
|
7
|
+
import { Debug, DebugEvents } from "#types";
|
|
8
|
+
import * as ActivationEvents from "@dxos/app-framework/ActivationEvents";
|
|
9
|
+
//#region src/capabilities/gen/node.ts
|
|
10
|
+
var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"), { environments: ["node"] });
|
|
11
|
+
var DebugSettings = AppCapability.settings(() => import("./chunk-settings.mjs"), {
|
|
12
|
+
activatesOn: ActivationEvents.Idle,
|
|
13
|
+
provides: [Debug.DebugCapabilities.Settings],
|
|
14
|
+
environments: ["node"]
|
|
15
|
+
});
|
|
16
|
+
var StatsPanel = Capability.lazyModule("StatsPanel", {
|
|
17
|
+
requires: [Capabilities.AtomRegistry],
|
|
18
|
+
provides: [AppCapabilities.StatsPanel],
|
|
19
|
+
props: ({ persistStats }) => ({ persist: persistStats ?? true }),
|
|
20
|
+
activatesOn: DebugEvents.Start
|
|
21
|
+
}, () => import("./chunk-stats-panel.mjs"));
|
|
22
|
+
var OperationHandler = AppCapability.operationHandler(() => import("./chunk-operation-handler.mjs"));
|
|
23
|
+
var MarkdownMenu = Capability.lazyModule("MarkdownMenu", {
|
|
24
|
+
provides: [MarkdownCapabilities.MenuExtension],
|
|
25
|
+
activatesOn: DebugEvents.Start
|
|
26
|
+
}, () => import("./chunk-markdown-menu.mjs"));
|
|
27
|
+
var LogRecording = Capability.lazyModule("LogRecording", {
|
|
28
|
+
provides: [],
|
|
29
|
+
activatesOn: DebugEvents.Start
|
|
30
|
+
}, () => import("./chunk-log-recording.mjs"));
|
|
31
|
+
var Translations = AppCapability.translations(translations);
|
|
32
|
+
var PluginAsset = void 0;
|
|
33
|
+
var ReactSurface = void 0;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { AppGraphBuilder, DebugSettings, LogRecording, MarkdownMenu, OperationHandler, PluginAsset, ReactSurface, StatsPanel, Translations };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=capabilities.node.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.node.mjs","names":[],"sources":["../../src/capabilities/gen/node.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'node' condition.\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\n\nimport { translations } from '#translations';\nimport { Debug, DebugEvents } from '#types';\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder'), {\n environments: ['node'],\n});\n\nexport const DebugSettings = AppCapability.settings(() => import('../settings'), {\n activatesOn: ActivationEvents.Idle,\n provides: [Debug.DebugCapabilities.Settings],\n environments: ['node'],\n});\n\nexport const StatsPanel = Capability.lazyModule(\n 'StatsPanel',\n {\n requires: [Capabilities.AtomRegistry],\n provides: [AppCapabilities.StatsPanel],\n props: ({ persistStats }: Debug.DebugPluginOptions) => ({ persist: persistStats ?? true }),\n activatesOn: DebugEvents.Start,\n },\n () => import('../stats-panel'),\n);\n\nexport const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler'));\n\nexport const MarkdownMenu = Capability.lazyModule(\n 'MarkdownMenu',\n { provides: [MarkdownCapabilities.MenuExtension], activatesOn: DebugEvents.Start },\n () => import('../markdown-menu'),\n);\n\nexport const LogRecording = Capability.lazyModule(\n 'LogRecording',\n { provides: [], activatesOn: DebugEvents.Start },\n () => import('../log-recording'),\n);\n\nexport const Translations = AppCapability.translations(translations);\n\nexport const PluginAsset = undefined;\nexport const ReactSurface = undefined;\n"],"mappings":";;;;;;;;;AAgBA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAAyB,EACjG,cAAc,CAAC,MAAM,EACvB,CAAC;AAED,IAAa,gBAAgB,cAAc,eAAe,OAAO,yBAAgB;CAC/E,aAAa,iBAAiB;CAC9B,UAAU,CAAC,MAAM,kBAAkB,QAAQ;CAC3C,cAAc,CAAC,MAAM;AACvB,CAAC;AAED,IAAa,aAAa,WAAW,WACnC,cACA;CACE,UAAU,CAAC,aAAa,YAAY;CACpC,UAAU,CAAC,gBAAgB,UAAU;CACrC,QAAQ,EAAE,oBAA8C,EAAE,SAAS,gBAAgB,KAAK;CACxF,aAAa,YAAY;AAC3B,SACM,OAAO,0BACf;AAEA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,gCAAuB;AAEnG,IAAa,eAAe,WAAW,WACrC,gBACA;CAAE,UAAU,CAAC,qBAAqB,aAAa;CAAG,aAAa,YAAY;AAAM,SAC3E,OAAO,4BACf;AAEA,IAAa,eAAe,WAAW,WACrC,gBACA;CAAE,UAAU,CAAC;CAAG,aAAa,YAAY;AAAM,SACzC,OAAO,4BACf;AAEA,IAAa,eAAe,cAAc,aAAa,YAAY;AAEnE,IAAa,cAAc,KAAA;AAC3B,IAAa,eAAe,KAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as Capabilities from "@dxos/app-framework/Capabilities";
|
|
2
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
3
|
+
import * as AppCapabilities from "@dxos/app-toolkit/AppCapabilities";
|
|
4
|
+
import * as AppCapability from "@dxos/app-toolkit/AppCapability";
|
|
5
|
+
import * as MarkdownCapabilities from "@dxos/plugin-markdown/MarkdownCapabilities";
|
|
6
|
+
import { translations } from "#translations";
|
|
7
|
+
import { DebugEvents } from "#types";
|
|
8
|
+
//#region src/capabilities/gen/workerd.ts
|
|
9
|
+
var StatsPanel = Capability.lazyModule("StatsPanel", {
|
|
10
|
+
requires: [Capabilities.AtomRegistry],
|
|
11
|
+
provides: [AppCapabilities.StatsPanel],
|
|
12
|
+
props: ({ persistStats }) => ({ persist: persistStats ?? true }),
|
|
13
|
+
activatesOn: DebugEvents.Start
|
|
14
|
+
}, () => import("./chunk-stats-panel.mjs"));
|
|
15
|
+
var OperationHandler = AppCapability.operationHandler(() => import("./chunk-operation-handler.mjs"));
|
|
16
|
+
var MarkdownMenu = Capability.lazyModule("MarkdownMenu", {
|
|
17
|
+
provides: [MarkdownCapabilities.MenuExtension],
|
|
18
|
+
activatesOn: DebugEvents.Start
|
|
19
|
+
}, () => import("./chunk-markdown-menu.mjs"));
|
|
20
|
+
var LogRecording = Capability.lazyModule("LogRecording", {
|
|
21
|
+
provides: [],
|
|
22
|
+
activatesOn: DebugEvents.Start
|
|
23
|
+
}, () => import("./chunk-log-recording.mjs"));
|
|
24
|
+
var Translations = AppCapability.translations(translations);
|
|
25
|
+
var AppGraphBuilder = void 0;
|
|
26
|
+
var DebugSettings = void 0;
|
|
27
|
+
var PluginAsset = void 0;
|
|
28
|
+
var ReactSurface = void 0;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { AppGraphBuilder, DebugSettings, LogRecording, MarkdownMenu, OperationHandler, PluginAsset, ReactSurface, StatsPanel, Translations };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=capabilities.workerd.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.workerd.mjs","names":[],"sources":["../../src/capabilities/gen/workerd.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'workerd' condition.\n\nimport * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\n\nimport { translations } from '#translations';\nimport { Debug, DebugEvents } from '#types';\n\nexport const StatsPanel = Capability.lazyModule(\n 'StatsPanel',\n {\n requires: [Capabilities.AtomRegistry],\n provides: [AppCapabilities.StatsPanel],\n props: ({ persistStats }: Debug.DebugPluginOptions) => ({ persist: persistStats ?? true }),\n activatesOn: DebugEvents.Start,\n },\n () => import('../stats-panel'),\n);\n\nexport const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler'));\n\nexport const MarkdownMenu = Capability.lazyModule(\n 'MarkdownMenu',\n { provides: [MarkdownCapabilities.MenuExtension], activatesOn: DebugEvents.Start },\n () => import('../markdown-menu'),\n);\n\nexport const LogRecording = Capability.lazyModule(\n 'LogRecording',\n { provides: [], activatesOn: DebugEvents.Start },\n () => import('../log-recording'),\n);\n\nexport const Translations = AppCapability.translations(translations);\n\nexport const AppGraphBuilder = undefined;\nexport const DebugSettings = undefined;\nexport const PluginAsset = undefined;\nexport const ReactSurface = undefined;\n"],"mappings":";;;;;;;;AAeA,IAAa,aAAa,WAAW,WACnC,cACA;CACE,UAAU,CAAC,aAAa,YAAY;CACpC,UAAU,CAAC,gBAAgB,UAAU;CACrC,QAAQ,EAAE,oBAA8C,EAAE,SAAS,gBAAgB,KAAK;CACxF,aAAa,YAAY;AAC3B,SACM,OAAO,0BACf;AAEA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,gCAAuB;AAEnG,IAAa,eAAe,WAAW,WACrC,gBACA;CAAE,UAAU,CAAC,qBAAqB,aAAa;CAAG,aAAa,YAAY;AAAM,SAC3E,OAAO,4BACf;AAEA,IAAa,eAAe,WAAW,WACrC,gBACA;CAAE,UAAU,CAAC;CAAG,aAAa,YAAY;AAAM,SACzC,OAAO,4BACf;AAEA,IAAa,eAAe,cAAc,aAAa,YAAY;AAEnE,IAAa,kBAAkB,KAAA;AAC/B,IAAa,gBAAgB,KAAA;AAC7B,IAAa,cAAc,KAAA;AAC3B,IAAa,eAAe,KAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useMemo, useState } from "react";
|
|
2
|
+
import { Filter, Json, Obj, Query } from "@dxos/echo";
|
|
2
3
|
import { Clipboard, Panel, ScrollArea, Toolbar } from "@dxos/react-ui";
|
|
3
4
|
import { mx } from "@dxos/ui-theme";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { Filter, Json, Obj, Query } from "@dxos/echo";
|
|
6
6
|
import { ObjectsTree } from "@dxos/devtools";
|
|
7
7
|
import { useQuery } from "@dxos/echo-react";
|
|
8
8
|
import { Syntax } from "@dxos/react-ui-syntax-highlighter";
|
|
@@ -10,11 +10,12 @@ import { Syntax } from "@dxos/react-ui-syntax-highlighter";
|
|
|
10
10
|
var DebugObjectPanel = ({ role, companionTo, onOpen, canOpen }) => {
|
|
11
11
|
const db = Obj.getDatabase(companionTo);
|
|
12
12
|
const [selectedId, setSelectedId] = useState(null);
|
|
13
|
-
const
|
|
13
|
+
const selectionQuery = useMemo(() => db ? Query.select(Filter.id(selectedId ?? companionTo.id)).options({ deleted: "include" }).from(db, { includeFeeds: true }) : Query.select(Filter.nothing()), [
|
|
14
14
|
db,
|
|
15
15
|
selectedId,
|
|
16
16
|
companionTo.id
|
|
17
|
-
])
|
|
17
|
+
]);
|
|
18
|
+
const [selectedObject] = useQuery(db, selectionQuery);
|
|
18
19
|
return /* @__PURE__ */ jsx(Clipboard.Provider, { children: /* @__PURE__ */ jsxs(Panel.Root, {
|
|
19
20
|
role,
|
|
20
21
|
children: [/* @__PURE__ */ jsx(Panel.Toolbar, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-DebugObjectPanel.mjs","names":[],"sources":["../../src/containers/DebugObjectPanel/DebugObjectPanel.tsx"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo, useState } from 'react';\n\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { ObjectsTree } from '@dxos/devtools';\nimport { type Entity, Filter, Json, Obj, Query } from '@dxos/echo';\nimport { useQuery } from '@dxos/echo-react';\nimport type { EntityId } from '@dxos/keys';\nimport { Clipboard, Panel, ScrollArea, Toolbar } from '@dxos/react-ui';\nimport { Syntax } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/ui-theme';\n\nexport type DebugObjectPanelProps = Pick<\n AppSurface.ObjectArticleProps<Obj.Unknown, {}, Obj.Unknown>,\n 'role' | 'companionTo'\n> & {\n onOpen?: (object: Obj.Unknown) => void;\n canOpen?: (entity: Entity.Snapshot) => boolean;\n};\n\nexport const DebugObjectPanel = ({ role, companionTo, onOpen, canOpen }: DebugObjectPanelProps) => {\n const db = Obj.getDatabase(companionTo);\n const [selectedId, setSelectedId] = useState<EntityId | null>(null);\n // Include feeds so that feed-backed objects (e.g. synced games) resolve in the selection query.\n const selectionQuery = useMemo(\n () =>\n db\n ? Query.select(Filter.id(selectedId ?? companionTo.id))\n .options({ deleted: 'include' })\n .from(db, { includeFeeds: true })\n : Query.select(Filter.nothing()),\n [db, selectedId, companionTo.id],\n );\n const [selectedObject] = useQuery(db, selectionQuery);\n\n return (\n <Clipboard.Provider>\n <Panel.Root role={role}>\n <Panel.Toolbar asChild>\n <Toolbar.Root />\n </Panel.Toolbar>\n <Panel.Content asChild>\n <div className={mx('grid divide-y divide-subdued-separator', db && 'grid-rows-[1fr_2fr]')}>\n {db && (\n <ScrollArea.Root>\n <ScrollArea.Viewport>\n <ObjectsTree\n db={db}\n root={companionTo}\n onSelect={(entity) => setSelectedId(entity.id)}\n onOpen={onOpen}\n canOpen={canOpen}\n />\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n )}\n <Syntax.Root\n data={selectedObject}\n getReplacer={(depth) => (db ? Json.createRefReplacer({ db, depth }) : undefined)}\n >\n <Panel.Root>\n <Panel.Toolbar asChild>\n <Toolbar.Root classNames='grid grid-cols-[1fr_3rem]'>\n <Syntax.Filter />\n <Syntax.Depth />\n </Toolbar.Root>\n </Panel.Toolbar>\n <Panel.Content asChild>\n <Syntax.Viewport>\n <Syntax.Code />\n </Syntax.Viewport>\n </Panel.Content>\n </Panel.Root>\n </Syntax.Root>\n </div>\n </Panel.Content>\n </Panel.Root>\n </Clipboard.Provider>\n );\n};\n\nDebugObjectPanel.displayName = 'DebugObjectPanel';\n"],"mappings":";;;;;;;;;AAuBA,IAAa,oBAAoB,EAAE,MAAM,aAAa,QAAQ,cAAqC;CACjG,MAAM,KAAK,IAAI,YAAY,WAAW;CACtC,MAAM,CAAC,YAAY,iBAAiB,SAA0B,IAAI;
|
|
1
|
+
{"version":3,"file":"chunk-DebugObjectPanel.mjs","names":[],"sources":["../../src/containers/DebugObjectPanel/DebugObjectPanel.tsx"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo, useState } from 'react';\n\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { ObjectsTree } from '@dxos/devtools';\nimport { type Entity, Filter, Json, Obj, Query } from '@dxos/echo';\nimport { useQuery } from '@dxos/echo-react';\nimport type { EntityId } from '@dxos/keys';\nimport { Clipboard, Panel, ScrollArea, Toolbar } from '@dxos/react-ui';\nimport { Syntax } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/ui-theme';\n\nexport type DebugObjectPanelProps = Pick<\n AppSurface.ObjectArticleProps<Obj.Unknown, {}, Obj.Unknown>,\n 'role' | 'companionTo'\n> & {\n onOpen?: (object: Obj.Unknown) => void;\n canOpen?: (entity: Entity.Snapshot) => boolean;\n};\n\nexport const DebugObjectPanel = ({ role, companionTo, onOpen, canOpen }: DebugObjectPanelProps) => {\n const db = Obj.getDatabase(companionTo);\n const [selectedId, setSelectedId] = useState<EntityId | null>(null);\n // Include feeds so that feed-backed objects (e.g. synced games) resolve in the selection query.\n const selectionQuery = useMemo(\n () =>\n db\n ? Query.select(Filter.id(selectedId ?? companionTo.id))\n .options({ deleted: 'include' })\n .from(db, { includeFeeds: true })\n : Query.select(Filter.nothing()),\n [db, selectedId, companionTo.id],\n );\n const [selectedObject] = useQuery(db, selectionQuery);\n\n return (\n <Clipboard.Provider>\n <Panel.Root role={role}>\n <Panel.Toolbar asChild>\n <Toolbar.Root />\n </Panel.Toolbar>\n <Panel.Content asChild>\n <div className={mx('grid divide-y divide-subdued-separator', db && 'grid-rows-[1fr_2fr]')}>\n {db && (\n <ScrollArea.Root>\n <ScrollArea.Viewport>\n <ObjectsTree\n db={db}\n root={companionTo}\n onSelect={(entity) => setSelectedId(entity.id)}\n onOpen={onOpen}\n canOpen={canOpen}\n />\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n )}\n <Syntax.Root\n data={selectedObject}\n getReplacer={(depth) => (db ? Json.createRefReplacer({ db, depth }) : undefined)}\n >\n <Panel.Root>\n <Panel.Toolbar asChild>\n <Toolbar.Root classNames='grid grid-cols-[1fr_3rem]'>\n <Syntax.Filter />\n <Syntax.Depth />\n </Toolbar.Root>\n </Panel.Toolbar>\n <Panel.Content asChild>\n <Syntax.Viewport>\n <Syntax.Code />\n </Syntax.Viewport>\n </Panel.Content>\n </Panel.Root>\n </Syntax.Root>\n </div>\n </Panel.Content>\n </Panel.Root>\n </Clipboard.Provider>\n );\n};\n\nDebugObjectPanel.displayName = 'DebugObjectPanel';\n"],"mappings":";;;;;;;;;AAuBA,IAAa,oBAAoB,EAAE,MAAM,aAAa,QAAQ,cAAqC;CACjG,MAAM,KAAK,IAAI,YAAY,WAAW;CACtC,MAAM,CAAC,YAAY,iBAAiB,SAA0B,IAAI;CAElE,MAAM,iBAAiB,cAEnB,KACI,MAAM,OAAO,OAAO,GAAG,cAAc,YAAY,EAAE,CAAC,CAAA,CACjD,QAAQ,EAAE,SAAS,UAAU,CAAC,CAAA,CAC9B,KAAK,IAAI,EAAE,cAAc,KAAK,CAAC,IAClC,MAAM,OAAO,OAAO,QAAQ,CAAC,GACnC;EAAC;EAAI;EAAY,YAAY;CAAE,CACjC;CACA,MAAM,CAAC,kBAAkB,SAAS,IAAI,cAAc;CAEpD,OACE,oBAAC,UAAU,UAAX,EAAA,UACE,qBAAC,MAAM,MAAP;EAAkB;EAAlB,UAAA,CACE,oBAAC,MAAM,SAAP;GAAe,SAAA;GACb,UAAA,oBAAC,QAAQ,MAAT,CAAe,CAAA;EACF,CAAA,GACf,oBAAC,MAAM,SAAP;GAAe,SAAA;GACb,UAAA,qBAAC,OAAD;IAAK,WAAW,GAAG,0CAA0C,MAAM,qBAAqB;IAAxF,UAAA,CACG,MACC,oBAAC,WAAW,MAAZ,EAAA,UACE,oBAAC,WAAW,UAAZ,EAAA,UACE,oBAAC,aAAD;KACM;KACJ,MAAM;KACN,WAAW,WAAW,cAAc,OAAO,EAAE;KACrC;KACC;IACV,CAAA,EACkB,CAAA,EACN,CAAA,GAEnB,oBAAC,OAAO,MAAR;KACE,MAAM;KACN,cAAc,UAAW,KAAK,KAAK,kBAAkB;MAAE;MAAI;KAAM,CAAC,IAAI,KAAA;KAEtE,UAAA,qBAAC,MAAM,MAAP,EAAA,UAAA,CACE,oBAAC,MAAM,SAAP;MAAe,SAAA;MACb,UAAA,qBAAC,QAAQ,MAAT;OAAc,YAAW;OAAzB,UAAA,CACE,oBAAC,OAAO,QAAR,CAAgB,CAAA,GAChB,oBAAC,OAAO,OAAR,CAAe,CAAA,CACH;;KACD,CAAA,GACf,oBAAC,MAAM,SAAP;MAAe,SAAA;MACb,UAAA,oBAAC,OAAO,UAAR,EAAA,UACE,oBAAC,OAAO,MAAR,CAAc,CAAA,EACC,CAAA;KACJ,CAAA,CACL,EAAA,CAAA;IACD,CAAA,CACV;;EACQ,CAAA,CACL;CACM,CAAA,EAAA,CAAA;AAExB;AAEA,iBAAiB,cAAc"}
|
|
@@ -1,21 +1,105 @@
|
|
|
1
|
-
import { setDeep } from "@dxos/util";
|
|
2
|
-
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
|
-
import { meta } from "#meta";
|
|
4
|
-
import { AppSpace } from "@dxos/app-toolkit";
|
|
5
|
-
import { IconButton, Input, Select, Toast, useFileDownload, useTranslation } from "@dxos/react-ui";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
1
|
import { Settings } from "#types";
|
|
2
|
+
import { meta } from "#meta";
|
|
3
|
+
import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
4
|
+
import { Flex, IconButton, Input, Select, Toast, useFileDownload, useTranslation } from "@dxos/react-ui";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { setDeep } from "@dxos/util";
|
|
8
7
|
import { useClient } from "@dxos/react-client";
|
|
8
|
+
import { Logger } from "@dxos/react-ui-debug";
|
|
9
|
+
import * as AppSpace from "@dxos/app-toolkit/AppSpace";
|
|
9
10
|
import { SaveConfig, Storage, defs } from "@dxos/config";
|
|
10
11
|
import { log } from "@dxos/log";
|
|
11
12
|
import { MANUAL_LOG_EXPORT_MAX_BYTES } from "@dxos/log-store-idb";
|
|
12
13
|
import { Form } from "@dxos/react-ui-form";
|
|
13
14
|
import { TRACE_ALL_KEY } from "@dxos/tracing";
|
|
15
|
+
import { getDebugPortController } from "@dxos/react-client/devtools";
|
|
16
|
+
//#region src/containers/DebugPortSettings/DebugPortSettings.tsx
|
|
17
|
+
/**
|
|
18
|
+
* Scopes the panel to the controller's own entries.
|
|
19
|
+
*
|
|
20
|
+
* A display filter, not `initialFilter`: that one narrows what the process-wide buffer captures,
|
|
21
|
+
* which would starve the main log companion reading the same buffer.
|
|
22
|
+
*/
|
|
23
|
+
var isDebugPortRow = (row) => (row.entry.meta?.F ?? "").includes(CONTROLLER_FILE);
|
|
24
|
+
var CONTROLLER_FILE = "devtools/debug-port-controller";
|
|
25
|
+
/**
|
|
26
|
+
* Start/stop the agent debug port and surface the session id an agent needs.
|
|
27
|
+
*
|
|
28
|
+
* The port evaluates agent-supplied code against the live client, so it is off until this switch is
|
|
29
|
+
* flipped, the session id is regenerated on every activation, and nothing survives a reload.
|
|
30
|
+
*/
|
|
31
|
+
var DebugPortSettings = ({ controller = getDebugPortController(), disabled }) => {
|
|
32
|
+
const { t } = useTranslation(meta.profile.key);
|
|
33
|
+
const subscribe = useCallback((listener) => controller.subscribe(listener), [controller]);
|
|
34
|
+
const getStatus = useCallback(() => controller.getStatus(), [controller]);
|
|
35
|
+
const status = useSyncExternalStore(subscribe, getStatus);
|
|
36
|
+
const handleToggle = useCallback((checked) => checked ? controller.start({ persist: true }) : controller.stop(), [controller]);
|
|
37
|
+
const handleCopy = useCallback(() => {
|
|
38
|
+
if (status.session) navigator.clipboard.writeText(status.session);
|
|
39
|
+
}, [status.session]);
|
|
40
|
+
return /* @__PURE__ */ jsxs(Form.Section, {
|
|
41
|
+
title: t("settings.debug-port.section.label"),
|
|
42
|
+
description: t("settings.debug-port.section.description"),
|
|
43
|
+
children: [/* @__PURE__ */ jsx(Form.Row, {
|
|
44
|
+
label: t("settings.debug-port.label"),
|
|
45
|
+
description: t("settings.debug-port.description"),
|
|
46
|
+
children: /* @__PURE__ */ jsxs(Flex, {
|
|
47
|
+
gap: "md",
|
|
48
|
+
align: "center",
|
|
49
|
+
children: [status.running && /* @__PURE__ */ jsxs("span", {
|
|
50
|
+
className: "text-sm text-description",
|
|
51
|
+
children: [
|
|
52
|
+
t("settings.debug-port.running.label"),
|
|
53
|
+
" ",
|
|
54
|
+
/* @__PURE__ */ jsx("span", {
|
|
55
|
+
className: "font-mono",
|
|
56
|
+
children: status.origin
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
}), /* @__PURE__ */ jsx(Input.Root, { children: /* @__PURE__ */ jsx(Input.Switch, {
|
|
60
|
+
checked: status.running,
|
|
61
|
+
disabled,
|
|
62
|
+
onCheckedChange: handleToggle
|
|
63
|
+
}) })]
|
|
64
|
+
})
|
|
65
|
+
}), status.running && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Form.Row, {
|
|
66
|
+
standalone: true,
|
|
67
|
+
label: t("settings.debug-port.session.label"),
|
|
68
|
+
description: t("settings.debug-port.session.description"),
|
|
69
|
+
children: /* @__PURE__ */ jsxs(Flex, {
|
|
70
|
+
gap: "sm",
|
|
71
|
+
align: "center",
|
|
72
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
73
|
+
className: "grow truncate font-mono text-sm",
|
|
74
|
+
children: status.session
|
|
75
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
76
|
+
icon: "ph--copy--regular",
|
|
77
|
+
iconOnly: true,
|
|
78
|
+
label: t("settings.debug-port.copy-session.label"),
|
|
79
|
+
onClick: handleCopy
|
|
80
|
+
})]
|
|
81
|
+
})
|
|
82
|
+
}), /* @__PURE__ */ jsx(Form.Row, {
|
|
83
|
+
standalone: true,
|
|
84
|
+
label: t("settings.debug-port.log.label"),
|
|
85
|
+
classNames: "md:grid-cols-1 md:[grid-template-areas:\"header\"\"description\"\"control\"\"validation\"]",
|
|
86
|
+
children: /* @__PURE__ */ jsx(Logger.Root, {
|
|
87
|
+
rowFilter: isDebugPortRow,
|
|
88
|
+
children: /* @__PURE__ */ jsx(Logger.Content, {
|
|
89
|
+
classNames: "max-h-[16lh]",
|
|
90
|
+
children: /* @__PURE__ */ jsx(Logger.List, {})
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
})] })]
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
DebugPortSettings.displayName = "DebugPortSettings";
|
|
97
|
+
//#endregion
|
|
14
98
|
//#region src/containers/DebugSettings/DebugSettings.tsx
|
|
15
99
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-debug/src/containers/DebugSettings/DebugSettings.tsx";
|
|
16
100
|
var StorageAdapters = {
|
|
17
|
-
opfs: defs.
|
|
18
|
-
idb: defs.
|
|
101
|
+
opfs: defs.Runtime_Client_Storage_StorageDriver.WEBFS,
|
|
102
|
+
idb: defs.Runtime_Client_Storage_StorageDriver.IDB
|
|
19
103
|
};
|
|
20
104
|
var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
|
|
21
105
|
const { t } = useTranslation(meta.profile.key);
|
|
@@ -37,22 +121,22 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
|
|
|
37
121
|
const fileName = `composer-${(/* @__PURE__ */ new Date()).toISOString().replace(/\W/g, "-")}.json`;
|
|
38
122
|
download(file, fileName);
|
|
39
123
|
if (onUpload) {
|
|
40
|
-
const
|
|
41
|
-
if (!
|
|
42
|
-
log.error("no
|
|
124
|
+
const defaultSpace = AppSpace.getDefaultSpace(client);
|
|
125
|
+
if (!defaultSpace) {
|
|
126
|
+
log.error("no default space available for upload", void 0, {
|
|
43
127
|
"~LogMeta": "~LogMeta",
|
|
44
128
|
F: __dxlog_file,
|
|
45
|
-
L:
|
|
129
|
+
L: 73,
|
|
46
130
|
S: void 0
|
|
47
131
|
});
|
|
48
132
|
return;
|
|
49
133
|
}
|
|
50
|
-
const info = await onUpload(
|
|
134
|
+
const info = await onUpload(defaultSpace.db, new File([file], fileName));
|
|
51
135
|
if (!info) {
|
|
52
136
|
log.error("diagnostics failed to upload to IPFS", void 0, {
|
|
53
137
|
"~LogMeta": "~LogMeta",
|
|
54
138
|
F: __dxlog_file,
|
|
55
|
-
L:
|
|
139
|
+
L: 78,
|
|
56
140
|
S: void 0
|
|
57
141
|
});
|
|
58
142
|
return;
|
|
@@ -70,7 +154,7 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
|
|
|
70
154
|
log.info("diagnostics", { url }, {
|
|
71
155
|
"~LogMeta": "~LogMeta",
|
|
72
156
|
F: __dxlog_file,
|
|
73
|
-
L:
|
|
157
|
+
L: 93,
|
|
74
158
|
S: void 0
|
|
75
159
|
});
|
|
76
160
|
}
|
|
@@ -136,7 +220,7 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
|
|
|
136
220
|
readonly: !onSettingsChange,
|
|
137
221
|
children: /* @__PURE__ */ jsx(Form.Viewport, {
|
|
138
222
|
scroll: true,
|
|
139
|
-
children: /* @__PURE__ */
|
|
223
|
+
children: /* @__PURE__ */ jsxs(Form.Content, { children: [/* @__PURE__ */ jsxs(Form.Section, {
|
|
140
224
|
title: meta.profile.name ?? meta.profile.key,
|
|
141
225
|
children: [
|
|
142
226
|
/* @__PURE__ */ jsx(Form.Row, {
|
|
@@ -218,7 +302,7 @@ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
|
|
|
218
302
|
})
|
|
219
303
|
})
|
|
220
304
|
]
|
|
221
|
-
}) })
|
|
305
|
+
}), /* @__PURE__ */ jsx(DebugPortSettings, { disabled: !onSettingsChange })] })
|
|
222
306
|
})
|
|
223
307
|
});
|
|
224
308
|
};
|