@dxos/plugin-debug 0.12.0-next-73daef452f1464b62efdbca75fb0067c1066f264 → 0.13.0
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/PLUGIN.mdl +241 -3
- package/README.md +27 -3
- package/dist/lib/Debug.mjs.map +1 -1
- package/dist/lib/DebugNodes.mjs +21 -2
- package/dist/lib/DebugNodes.mjs.map +1 -1
- package/dist/lib/DebugOperation.mjs +166 -2
- package/dist/lib/DebugOperation.mjs.map +1 -1
- package/dist/lib/DebugPlugin.mjs.map +1 -1
- package/dist/lib/DebugSurface.mjs +7 -2
- package/dist/lib/DebugSurface.mjs.map +1 -1
- package/dist/lib/IncidentSpace.mjs +2 -0
- package/dist/lib/PipelineSpace.mjs +2 -0
- package/dist/lib/ReviewSpace.mjs +2 -0
- package/dist/lib/StockfishSpace.mjs +2 -0
- package/dist/lib/TidepoolSpace.mjs +2 -0
- package/dist/lib/WeatherSpace.mjs +2 -0
- package/dist/lib/WorkerSpace.mjs +2 -0
- package/dist/lib/capabilities.browser.mjs +71 -0
- package/dist/lib/capabilities.browser.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +17 -7
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/capabilities.node.mjs +13 -3
- package/dist/lib/capabilities.node.mjs.map +1 -1
- package/dist/lib/capabilities.tauri.mjs +71 -0
- package/dist/lib/capabilities.tauri.mjs.map +1 -0
- package/dist/lib/capabilities.workerd.mjs +3 -1
- package/dist/lib/capabilities.workerd.mjs.map +1 -1
- package/dist/lib/chunk-DebugConsole.mjs +241 -0
- package/dist/lib/chunk-DebugConsole.mjs.map +1 -0
- package/dist/lib/chunk-DebugObjectPanel.mjs +12 -16
- package/dist/lib/chunk-DebugObjectPanel.mjs.map +1 -1
- package/dist/lib/chunk-DebugPanelDrawer.mjs +48 -0
- package/dist/lib/chunk-DebugPanelDrawer.mjs.map +1 -0
- package/dist/lib/chunk-DebugPanelHeader.mjs +280 -0
- package/dist/lib/chunk-DebugPanelHeader.mjs.map +1 -0
- package/dist/lib/chunk-DebugPanelStatus.mjs +127 -0
- package/dist/lib/chunk-DebugPanelStatus.mjs.map +1 -0
- package/dist/lib/chunk-DebugSettings.mjs +81 -70
- package/dist/lib/chunk-DebugSettings.mjs.map +1 -1
- package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs +21 -12
- package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs.map +1 -1
- package/dist/lib/chunk-DebugStatus.mjs +12 -12
- package/dist/lib/chunk-DebugStatus.mjs.map +1 -1
- package/dist/lib/chunk-IncidentSpace.mjs +269 -0
- package/dist/lib/chunk-IncidentSpace.mjs.map +1 -0
- package/dist/lib/chunk-LoggerPanel.mjs +18 -0
- package/dist/lib/chunk-LoggerPanel.mjs.map +1 -0
- package/dist/lib/chunk-PLUGIN.mjs +6 -0
- package/dist/lib/chunk-PLUGIN.mjs.map +1 -0
- package/dist/lib/chunk-PipelineSpace.mjs +378 -0
- package/dist/lib/chunk-PipelineSpace.mjs.map +1 -0
- package/dist/lib/chunk-ReviewSpace.mjs +356 -0
- package/dist/lib/chunk-ReviewSpace.mjs.map +1 -0
- package/dist/lib/chunk-SpaceGenerator.mjs +107 -73
- package/dist/lib/chunk-SpaceGenerator.mjs.map +1 -1
- package/dist/lib/chunk-StatsPanel.mjs +28 -35
- package/dist/lib/chunk-StatsPanel.mjs.map +1 -1
- package/dist/lib/chunk-StockfishSpace.mjs +563 -0
- package/dist/lib/chunk-StockfishSpace.mjs.map +1 -0
- package/dist/lib/chunk-TidepoolSpace.mjs +544 -0
- package/dist/lib/chunk-TidepoolSpace.mjs.map +1 -0
- package/dist/lib/chunk-WeatherSpace.mjs +206 -0
- package/dist/lib/chunk-WeatherSpace.mjs.map +1 -0
- package/dist/lib/chunk-Wireframe.mjs +6 -6
- package/dist/lib/chunk-Wireframe.mjs.map +1 -1
- package/dist/lib/chunk-WorkerSpace.mjs +177 -0
- package/dist/lib/chunk-WorkerSpace.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +72 -40
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-create-space-from-template.mjs +55 -0
- package/dist/lib/chunk-create-space-from-template.mjs.map +1 -0
- package/dist/lib/chunk-errors.mjs +13 -0
- package/dist/lib/chunk-errors.mjs.map +1 -0
- package/dist/lib/chunk-graph-retention.mjs +14 -0
- package/dist/lib/chunk-graph-retention.mjs.map +1 -0
- package/dist/lib/chunk-insert-lorem-ipsum.mjs +2 -2
- package/dist/lib/chunk-log-recording.mjs +29 -1
- package/dist/lib/chunk-log-recording.mjs.map +1 -1
- package/dist/lib/chunk-open-page.mjs +29 -0
- package/dist/lib/chunk-open-page.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +5 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -1
- package/dist/lib/chunk-react-surface.mjs +73 -71
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/chunk-settings.mjs +2 -2
- package/dist/lib/chunk-settings.mjs.map +1 -1
- package/dist/lib/chunk-snapshot.mjs +170 -0
- package/dist/lib/chunk-snapshot.mjs.map +1 -0
- package/dist/lib/chunk-space-templates.mjs +21 -0
- package/dist/lib/chunk-space-templates.mjs.map +1 -0
- package/dist/lib/chunk-stats-panel.mjs +1 -1
- package/dist/lib/chunk-stats-panel.mjs.map +1 -1
- package/dist/lib/chunk-undo.mjs +17 -0
- package/dist/lib/chunk-undo.mjs.map +1 -0
- package/dist/lib/chunk-view-state.mjs +37 -0
- package/dist/lib/chunk-view-state.mjs.map +1 -0
- package/dist/lib/components.mjs +68 -28
- package/dist/lib/components.mjs.map +1 -1
- package/dist/lib/containers.mjs +5 -2
- package/dist/lib/containers.mjs.map +1 -1
- package/dist/lib/index.mjs +8 -2
- package/dist/lib/meta.mjs +3 -2
- package/dist/lib/meta.mjs.map +1 -1
- package/dist/lib/operations.mjs +7 -1
- package/dist/lib/operations.mjs.map +1 -1
- package/dist/lib/plugin.mjs +2 -2
- package/dist/lib/plugin.mjs.map +1 -1
- package/dist/lib/translations.mjs +13 -4
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/types/scripts/build-template-archive.d.ts +2 -0
- package/dist/types/scripts/build-template-archive.d.ts.map +1 -0
- package/dist/types/src/DebugPlugin.d.ts +2 -2
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/DebugSurfaces.d.ts +4 -5
- package/dist/types/src/capabilities/DebugSurfaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +31 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.test.d.ts +2 -0
- package/dist/types/src/capabilities/app-graph-builder.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/browser.d.ts +14 -0
- package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/node.d.ts +2 -0
- package/dist/types/src/capabilities/gen/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/tauri.d.ts +14 -0
- package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts +2 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/graph-retention.d.ts +5 -0
- package/dist/types/src/capabilities/graph-retention.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +2 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/log-recording.d.ts +4 -0
- package/dist/types/src/capabilities/log-recording.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/space-templates.d.ts +14 -0
- package/dist/types/src/capabilities/space-templates.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts +4 -3
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -1
- package/dist/types/src/components/SchemaTable/index.d.ts +1 -1
- package/dist/types/src/components/SchemaTable/index.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +2 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.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 +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugConsole/DebugConsole.d.ts +12 -0
- package/dist/types/src/containers/DebugConsole/DebugConsole.d.ts.map +1 -0
- package/dist/types/src/containers/DebugConsole/DebugConsole.stories.d.ts +103 -0
- package/dist/types/src/containers/DebugConsole/DebugConsole.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DebugConsole/cli.d.ts +24 -0
- package/dist/types/src/containers/DebugConsole/cli.d.ts.map +1 -0
- package/dist/types/src/containers/DebugConsole/index.d.ts +2 -0
- package/dist/types/src/containers/DebugConsole/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +1 -1
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -1
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts +1 -1
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugPanel/DebugPanel.d.ts +30 -0
- package/dist/types/src/containers/DebugPanel/DebugPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/DebugPanel.stories.d.ts +126 -0
- package/dist/types/src/containers/DebugPanel/DebugPanel.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelContext.d.ts +16 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelContext.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelHeader.d.ts +14 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelHeader.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelMain.d.ts +6 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelMain.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelSidebar.d.ts +6 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelSidebar.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/index.d.ts +7 -0
- package/dist/types/src/containers/DebugPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/view-state.d.ts +46 -0
- package/dist/types/src/containers/DebugPanel/view-state.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.d.ts +10 -0
- package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.stories.d.ts +114 -0
- package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanelDrawer/index.d.ts +2 -0
- package/dist/types/src/containers/DebugPanelDrawer/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.d.ts +11 -0
- package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.stories.d.ts +107 -0
- package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanelStatus/index.d.ts +2 -0
- package/dist/types/src/containers/DebugPanelStatus/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.d.ts.map +1 -1
- package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.stories.d.ts +13 -4
- package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DebugPortSettings/index.d.ts +1 -1
- package/dist/types/src/containers/DebugPortSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts +2 -2
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts +14 -5
- package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSettings/index.d.ts +1 -1
- package/dist/types/src/containers/DebugSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugStatus/index.d.ts +1 -1
- package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -1
- package/dist/types/src/containers/LoggerPanel/LoggerPanel.d.ts +6 -0
- package/dist/types/src/containers/LoggerPanel/LoggerPanel.d.ts.map +1 -0
- package/dist/types/src/containers/LoggerPanel/LoggerPanel.stories.d.ts +107 -0
- package/dist/types/src/containers/LoggerPanel/LoggerPanel.stories.d.ts.map +1 -0
- package/dist/types/src/containers/LoggerPanel/index.d.ts +2 -0
- package/dist/types/src/containers/LoggerPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.stories.d.ts +13 -4
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceGenerator/index.d.ts +1 -1
- package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -1
- package/dist/types/src/containers/StatsPanel/StatsPanel.d.ts +5 -1
- package/dist/types/src/containers/StatsPanel/StatsPanel.d.ts.map +1 -1
- package/dist/types/src/containers/StatsPanel/index.d.ts +1 -1
- package/dist/types/src/containers/StatsPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts +2 -2
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -1
- package/dist/types/src/containers/Wireframe/index.d.ts +1 -1
- package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +7 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +123 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/DebugOperationHandlerSet.d.ts.map +1 -1
- package/dist/types/src/operations/create-space-from-template.d.ts +5 -0
- package/dist/types/src/operations/create-space-from-template.d.ts.map +1 -0
- package/dist/types/src/operations/errors.d.ts +33 -0
- package/dist/types/src/operations/errors.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/open-page.d.ts +5 -0
- package/dist/types/src/operations/open-page.d.ts.map +1 -0
- package/dist/types/src/operations/snapshot.d.ts +5 -0
- package/dist/types/src/operations/snapshot.d.ts.map +1 -0
- package/dist/types/src/operations/snapshot.test.d.ts +2 -0
- package/dist/types/src/operations/snapshot.test.d.ts.map +1 -0
- package/dist/types/src/operations/undo.d.ts +5 -0
- package/dist/types/src/operations/undo.d.ts.map +1 -0
- package/dist/types/src/operations/undo.test.d.ts +2 -0
- package/dist/types/src/operations/undo.test.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts.map +1 -1
- package/dist/types/src/samples/crm/PipelineSpace.d.ts +21 -0
- package/dist/types/src/samples/crm/PipelineSpace.d.ts.map +1 -0
- package/dist/types/src/samples/crm/PipelineSpace.test.d.ts +2 -0
- package/dist/types/src/samples/crm/PipelineSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/crm/accounts.d.ts +55 -0
- package/dist/types/src/samples/crm/accounts.d.ts.map +1 -0
- package/dist/types/src/samples/crm/inbox.d.ts +14 -0
- package/dist/types/src/samples/crm/inbox.d.ts.map +1 -0
- package/dist/types/src/samples/crm/pipeline.d.ts +9 -0
- package/dist/types/src/samples/crm/pipeline.d.ts.map +1 -0
- package/dist/types/src/samples/crm/util.d.ts +14 -0
- package/dist/types/src/samples/crm/util.d.ts.map +1 -0
- package/dist/types/src/samples/incident/IncidentSpace.d.ts +21 -0
- package/dist/types/src/samples/incident/IncidentSpace.d.ts.map +1 -0
- package/dist/types/src/samples/incident/IncidentSpace.test.d.ts +2 -0
- package/dist/types/src/samples/incident/IncidentSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/incident/docs.d.ts +14 -0
- package/dist/types/src/samples/incident/docs.d.ts.map +1 -0
- package/dist/types/src/samples/incident/project.d.ts +16 -0
- package/dist/types/src/samples/incident/project.d.ts.map +1 -0
- package/dist/types/src/samples/incident/tasks.d.ts +9 -0
- package/dist/types/src/samples/incident/tasks.d.ts.map +1 -0
- package/dist/types/src/samples/incident/util.d.ts +32 -0
- package/dist/types/src/samples/incident/util.d.ts.map +1 -0
- package/dist/types/src/samples/index.d.ts +8 -0
- package/dist/types/src/samples/index.d.ts.map +1 -0
- package/dist/types/src/samples/review/ReviewSpace.d.ts +19 -0
- package/dist/types/src/samples/review/ReviewSpace.d.ts.map +1 -0
- package/dist/types/src/samples/review/ReviewSpace.test.d.ts +2 -0
- package/dist/types/src/samples/review/ReviewSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/review/assets.d.ts +19 -0
- package/dist/types/src/samples/review/assets.d.ts.map +1 -0
- package/dist/types/src/samples/review/util.d.ts +4 -0
- package/dist/types/src/samples/review/util.d.ts.map +1 -0
- package/dist/types/src/samples/review/work.d.ts +15 -0
- package/dist/types/src/samples/review/work.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/StockfishSpace.d.ts +27 -0
- package/dist/types/src/samples/stockfish/StockfishSpace.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/StockfishSpace.test.d.ts +2 -0
- package/dist/types/src/samples/stockfish/StockfishSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/docs.d.ts +8 -0
- package/dist/types/src/samples/stockfish/docs.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/game.d.ts +10 -0
- package/dist/types/src/samples/stockfish/game.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/project.d.ts +31 -0
- package/dist/types/src/samples/stockfish/project.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/run.test.d.ts +2 -0
- package/dist/types/src/samples/stockfish/run.test.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/skill.d.ts +8 -0
- package/dist/types/src/samples/stockfish/skill.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/tasks.d.ts +12 -0
- package/dist/types/src/samples/stockfish/tasks.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/util.d.ts +14 -0
- package/dist/types/src/samples/stockfish/util.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/TidepoolSpace.d.ts +22 -0
- package/dist/types/src/samples/tidepool/TidepoolSpace.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/TidepoolSpace.test.d.ts +2 -0
- package/dist/types/src/samples/tidepool/TidepoolSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/docs.d.ts +12 -0
- package/dist/types/src/samples/tidepool/docs.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/project.d.ts +20 -0
- package/dist/types/src/samples/tidepool/project.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/tasks.d.ts +14 -0
- package/dist/types/src/samples/tidepool/tasks.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/team.d.ts +9 -0
- package/dist/types/src/samples/tidepool/team.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/util.d.ts +14 -0
- package/dist/types/src/samples/tidepool/util.d.ts.map +1 -0
- package/dist/types/src/samples/weather/WeatherSpace.d.ts +21 -0
- package/dist/types/src/samples/weather/WeatherSpace.d.ts.map +1 -0
- package/dist/types/src/samples/weather/WeatherSpace.test.d.ts +2 -0
- package/dist/types/src/samples/weather/WeatherSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/weather/project.d.ts +20 -0
- package/dist/types/src/samples/weather/project.d.ts.map +1 -0
- package/dist/types/src/samples/weather/skill.d.ts +12 -0
- package/dist/types/src/samples/weather/skill.d.ts.map +1 -0
- package/dist/types/src/samples/weather/tasks.d.ts +9 -0
- package/dist/types/src/samples/weather/tasks.d.ts.map +1 -0
- package/dist/types/src/samples/weather/util.d.ts +16 -0
- package/dist/types/src/samples/weather/util.d.ts.map +1 -0
- package/dist/types/src/samples/worker/WorkerSpace.d.ts +22 -0
- package/dist/types/src/samples/worker/WorkerSpace.d.ts.map +1 -0
- package/dist/types/src/samples/worker/WorkerSpace.test.d.ts +2 -0
- package/dist/types/src/samples/worker/WorkerSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/worker/project.d.ts +18 -0
- package/dist/types/src/samples/worker/project.d.ts.map +1 -0
- package/dist/types/src/samples/worker/tasks.d.ts +9 -0
- package/dist/types/src/samples/worker/tasks.d.ts.map +1 -0
- package/dist/types/src/samples/worker/util.d.ts +14 -0
- package/dist/types/src/samples/worker/util.d.ts.map +1 -0
- package/dist/types/src/stories/SpaceTemplates.stories.d.ts +114 -0
- package/dist/types/src/stories/SpaceTemplates.stories.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/stub-drawer-plugin.d.ts +8 -0
- package/dist/types/src/testing/stub-drawer-plugin.d.ts.map +1 -0
- package/dist/types/src/testing/stub-tools-plugin.d.ts +19 -0
- package/dist/types/src/testing/stub-tools-plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +13 -4
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Debug.d.ts +2 -2
- package/dist/types/src/types/Debug.d.ts.map +1 -1
- package/dist/types/src/types/DebugNodes.d.ts +13 -1
- package/dist/types/src/types/DebugNodes.d.ts.map +1 -1
- package/dist/types/src/types/DebugOperation.d.ts +119 -0
- package/dist/types/src/types/DebugOperation.d.ts.map +1 -1
- package/dist/types/src/types/DebugSurface.d.ts +7 -0
- package/dist/types/src/types/DebugSurface.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +6 -6
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +3 -2
- package/package.json +129 -73
- package/scripts/build-template-archive.ts +65 -0
- package/src/DebugPlugin.ts +1 -1
- package/src/capabilities/DebugSurfaces.tsx +85 -71
- package/src/capabilities/app-graph-builder.test.ts +45 -0
- package/src/capabilities/app-graph-builder.ts +83 -46
- package/src/capabilities/gen/browser.ts +85 -0
- package/src/capabilities/gen/node.ts +15 -8
- package/src/capabilities/gen/tauri.ts +85 -0
- package/src/capabilities/gen/workerd.ts +11 -4
- package/src/capabilities/graph-retention.ts +23 -0
- package/src/capabilities/index.ts +18 -10
- package/src/capabilities/log-recording.ts +20 -1
- package/src/capabilities/operation-handler.ts +9 -0
- package/src/capabilities/react-surface.ts +33 -29
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/space-templates.ts +25 -0
- package/src/capabilities/stats-panel.ts +1 -1
- package/src/components/SchemaTable/SchemaTable.tsx +44 -10
- package/src/components/SchemaTable/index.ts +1 -1
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +22 -2
- package/src/components/SpaceGenerator/index.ts +2 -2
- package/src/components/SpaceGenerator/presets.ts +4 -4
- package/src/components/index.ts +2 -2
- package/src/containers/DebugConsole/DebugConsole.stories.tsx +29 -0
- package/src/containers/DebugConsole/DebugConsole.tsx +94 -0
- package/src/containers/DebugConsole/cli.ts +296 -0
- package/src/containers/DebugConsole/index.ts +5 -0
- package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +44 -44
- package/src/containers/DebugObjectPanel/index.ts +1 -1
- package/src/containers/DebugPanel/DebugPanel.stories.tsx +118 -0
- package/src/containers/DebugPanel/DebugPanel.tsx +72 -0
- package/src/containers/DebugPanel/DebugPanelContext.ts +33 -0
- package/src/containers/DebugPanel/DebugPanelHeader.tsx +54 -0
- package/src/containers/DebugPanel/DebugPanelMain.tsx +116 -0
- package/src/containers/DebugPanel/DebugPanelSidebar.tsx +123 -0
- package/src/containers/DebugPanel/index.ts +10 -0
- package/src/containers/DebugPanel/view-state.ts +60 -0
- package/src/containers/DebugPanelDrawer/DebugPanelDrawer.stories.tsx +92 -0
- package/src/containers/DebugPanelDrawer/DebugPanelDrawer.tsx +72 -0
- package/src/containers/DebugPanelDrawer/index.ts +5 -0
- package/src/containers/DebugPanelStatus/DebugPanelStatus.stories.tsx +119 -0
- package/src/containers/DebugPanelStatus/DebugPanelStatus.tsx +167 -0
- package/src/containers/DebugPanelStatus/index.ts +5 -0
- package/src/containers/DebugPortSettings/DebugPortSettings.stories.tsx +2 -2
- package/src/containers/DebugPortSettings/DebugPortSettings.tsx +33 -40
- package/src/containers/DebugPortSettings/index.ts +1 -1
- package/src/containers/DebugSettings/DebugSettings.stories.tsx +1 -1
- package/src/containers/DebugSettings/DebugSettings.tsx +71 -64
- package/src/containers/DebugSettings/index.ts +1 -1
- package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +39 -28
- package/src/containers/DebugSpaceObjectsPanel/index.ts +1 -1
- package/src/containers/DebugStatus/DebugStatus.tsx +10 -10
- package/src/containers/DebugStatus/index.ts +1 -1
- package/src/containers/LoggerPanel/LoggerPanel.stories.tsx +62 -0
- package/src/containers/LoggerPanel/LoggerPanel.tsx +28 -0
- package/src/containers/LoggerPanel/index.ts +5 -0
- package/src/containers/SpaceGenerator/SpaceGenerator.stories.tsx +8 -8
- package/src/containers/SpaceGenerator/SpaceGenerator.tsx +102 -73
- package/src/containers/SpaceGenerator/index.ts +1 -1
- package/src/containers/StatsPanel/StatsPanel.tsx +32 -31
- package/src/containers/StatsPanel/index.ts +1 -1
- package/src/containers/Wireframe/Wireframe.tsx +8 -7
- package/src/containers/Wireframe/index.ts +1 -1
- package/src/containers/index.ts +22 -9
- package/src/errors.ts +23 -0
- package/src/index.ts +2 -2
- package/src/meta.ts +1 -1
- package/src/operations/DebugOperationHandlerSet.ts +5 -1
- package/src/operations/create-space-from-template.ts +57 -0
- package/src/operations/errors.ts +8 -0
- package/src/operations/index.ts +1 -1
- package/src/operations/open-page.ts +51 -0
- package/src/operations/snapshot.test.ts +57 -0
- package/src/operations/snapshot.ts +243 -0
- package/src/operations/undo.test.ts +19 -0
- package/src/operations/undo.ts +28 -0
- package/src/plugin.tsx +4 -0
- package/src/samples/crm/PipelineSpace.test.ts +55 -0
- package/src/samples/crm/PipelineSpace.ts +52 -0
- package/src/samples/crm/accounts.ts +153 -0
- package/src/samples/crm/inbox.ts +158 -0
- package/src/samples/crm/pipeline.ts +70 -0
- package/src/samples/crm/util.ts +18 -0
- package/src/samples/incident/IncidentSpace.test.ts +68 -0
- package/src/samples/incident/IncidentSpace.ts +61 -0
- package/src/samples/incident/docs.ts +111 -0
- package/src/samples/incident/project.ts +61 -0
- package/src/samples/incident/tasks.ts +101 -0
- package/src/samples/incident/util.ts +24 -0
- package/src/samples/index.ts +11 -0
- package/src/samples/review/ReviewSpace.test.ts +89 -0
- package/src/samples/review/ReviewSpace.ts +47 -0
- package/src/samples/review/assets.ts +123 -0
- package/src/samples/review/util.ts +10 -0
- package/src/samples/review/work.ts +249 -0
- package/src/samples/stockfish/StockfishSpace.test.ts +129 -0
- package/src/samples/stockfish/StockfishSpace.ts +70 -0
- package/src/samples/stockfish/docs.ts +65 -0
- package/src/samples/stockfish/game.ts +47 -0
- package/src/samples/stockfish/project.ts +87 -0
- package/src/samples/stockfish/run.test.ts +193 -0
- package/src/samples/stockfish/skill.ts +154 -0
- package/src/samples/stockfish/tasks.ts +306 -0
- package/src/samples/stockfish/util.ts +17 -0
- package/src/samples/tidepool/TidepoolSpace.test.ts +61 -0
- package/src/samples/tidepool/TidepoolSpace.ts +65 -0
- package/src/samples/tidepool/docs.ts +140 -0
- package/src/samples/tidepool/project.ts +57 -0
- package/src/samples/tidepool/tasks.ts +252 -0
- package/src/samples/tidepool/team.ts +87 -0
- package/src/samples/tidepool/util.ts +18 -0
- package/src/samples/weather/WeatherSpace.test.ts +93 -0
- package/src/samples/weather/WeatherSpace.ts +59 -0
- package/src/samples/weather/project.ts +76 -0
- package/src/samples/weather/skill.ts +45 -0
- package/src/samples/weather/tasks.ts +98 -0
- package/src/samples/weather/util.ts +21 -0
- package/src/samples/worker/WorkerSpace.test.ts +102 -0
- package/src/samples/worker/WorkerSpace.ts +56 -0
- package/src/samples/worker/project.ts +72 -0
- package/src/samples/worker/tasks.ts +119 -0
- package/src/samples/worker/util.ts +17 -0
- package/src/stories/SpaceTemplates.stories.tsx +105 -0
- package/src/testing/index.ts +6 -0
- package/src/testing/stub-drawer-plugin.ts +65 -0
- package/src/testing/stub-tools-plugin.tsx +95 -0
- package/src/translations.ts +15 -6
- package/src/types/Debug.ts +2 -2
- package/src/types/DebugNodes.ts +21 -1
- package/src/types/DebugOperation.ts +206 -0
- package/src/types/DebugSurface.ts +7 -0
- package/src/types/index.ts +6 -6
- package/dist/lib/chunk-LogStatus.mjs +0 -44
- package/dist/lib/chunk-LogStatus.mjs.map +0 -1
- package/dist/types/src/containers/LogStatus/LogStatus.d.ts +0 -6
- package/dist/types/src/containers/LogStatus/LogStatus.d.ts.map +0 -1
- package/dist/types/src/containers/LogStatus/index.d.ts +0 -2
- package/dist/types/src/containers/LogStatus/index.d.ts.map +0 -1
- package/src/containers/LogStatus/LogStatus.tsx +0 -51
- package/src/containers/LogStatus/index.ts +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-DebugConsole.mjs","names":[],"sources":["../../src/operations/errors.ts","../../src/containers/DebugConsole/cli.ts","../../src/containers/DebugConsole/DebugConsole.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { BaseError } from '@dxos/errors';\n\n/** Debug operation failed. The underlying failure, where there is one, is the `cause`. */\nexport class DebugOperationError extends BaseError.extend('DebugOperationError', 'Debug operation failed.') {}\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Args from 'effect/cli/Argument';\nimport * as Command from 'effect/cli/Command';\nimport * as Flag from 'effect/cli/Flag';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\n\nimport * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport type * as Devtools from '@dxos/app-framework/Devtools';\nimport * as Plugin from '@dxos/app-framework/Plugin';\nimport type * as PluginManager from '@dxos/app-framework/PluginManager';\nimport type * as Operation from '@dxos/compute/Operation';\nimport { BaseError } from '@dxos/errors';\nimport { SpaceId } from '@dxos/keys';\nimport { getDebugPortController } from '@dxos/react-client/devtools';\n\nimport { DebugOperationError } from '../../operations/errors.ts';\n\n/**\n * The debug console's command set — the introspection surface an agent uses over the debug port\n * (operations, snapshot, plugin management), driveable by hand. Operations are invoked through the\n * same invoker the agent path uses, so the two surfaces cannot drift.\n */\nexport type DebugCli = {\n command: ReturnType<typeof makeCommand>;\n layer: Layer.Layer<Plugin.Service | Capability.Service, never, never>;\n};\n\nexport type DebugCliOptions = {\n /** Receives each command result as printed — the clipboard source for \"copy last result\". */\n onResult?: (text: string) => void;\n};\n\nconst normalizeKey = (key: unknown): string => String(key).replace(/^dxn:/, '');\n\n/**\n * The Linear label the PostHog feedback submissions sync under; console-filed issues carry it too\n * so both sources land in one triage view.\n */\nconst REPORT_LABEL = 'Composer Feedback Form';\n\nconst findDefinition = Effect.fn(function* (key: string) {\n const capabilities = (yield* Plugin.Service).capabilities;\n const wanted = normalizeKey(key);\n for (const set of capabilities.getAll(Capabilities.OperationHandler)) {\n const definition = set.definitions().find((candidate) => normalizeKey(candidate.meta.key) === wanted);\n if (definition) {\n return definition;\n }\n }\n return yield* Effect.fail(new DebugOperationError({ message: `Unknown operation: ${key} (try \"ops\").` }));\n});\n\nconst invokeOperation = Effect.fn(function* (key: string, input: unknown, spaceId?: SpaceId) {\n const capabilities = (yield* Plugin.Service).capabilities;\n const definition = yield* findDefinition(key);\n const invoker = capabilities.get(Capabilities.OperationInvoker);\n const { data, error } = yield* Effect.promise(() =>\n invoker.invokePromise(definition as Operation.Definition.Any, input as never, spaceId ? { spaceId } : undefined),\n );\n if (error) {\n return yield* Effect.fail(error instanceof BaseError ? error : DebugOperationError.wrap()(error));\n }\n return data;\n});\n\n/** Results may hold live objects; a snapshot of what is printable beats a serializer crash. */\nconst format = (value: unknown): string => {\n if (value === undefined) {\n return 'undefined';\n }\n if (typeof value === 'string') {\n return value;\n }\n try {\n return JSON.stringify(value, null, 2) ?? String(value);\n } catch {\n return String(value);\n }\n};\n\n/**\n * Evaluates a snippet with the same bindings the agent debug port provides (`dxos`, `composer`).\n * Tried as an expression first so `1 + 1` works; statements fall back to an async body.\n */\nconst evalSnippet = (code: string): Promise<unknown> => {\n const compile = () => {\n try {\n // eslint-disable-next-line no-implied-eval -- eval is this console's purpose, same as the debug port.\n return new Function('dxos', 'composer', `'use strict'; return (async () => (${code}))();`);\n } catch {\n // eslint-disable-next-line no-implied-eval -- as above; statement-shaped snippets need a body.\n return new Function('dxos', 'composer', `'use strict'; return (async () => { ${code} })();`);\n }\n };\n const composer: Devtools.ComposerDevtools | undefined = globalThis.composer;\n return Promise.resolve(compile()(Reflect.get(globalThis, '__DXOS__'), composer));\n};\n\nconst makeCommand = (options: DebugCliOptions = {}) => {\n const print = (value: unknown) =>\n Effect.suspend(() => {\n const text = format(value);\n options.onResult?.(text);\n return Console.log(text);\n });\n\n const snapshot = Command.make('snapshot', {}, () =>\n Effect.gen(function* () {\n yield* print(yield* invokeOperation('org.dxos.operation.debug.snapshot', {}));\n }),\n ).pipe(Command.withDescription('One JSON document of the live UI state: layout, attention, planks, actions.'));\n\n const plugins = Command.make(\n 'plugins',\n {\n all: Flag.Boolean('all').pipe(Flag.withDefault(false), Flag.withDescription('Include disabled plugins.')),\n },\n ({ all }) =>\n Effect.gen(function* () {\n const manager = yield* Plugin.Service;\n const enabled = new Set(manager.getEnabled());\n const active = new Set(manager.getActive());\n const rows = manager\n .getPlugins()\n .map((plugin) => {\n const id = plugin.meta.profile.key;\n return {\n id,\n enabled: enabled.has(id),\n active: plugin.modules.some((module) => active.has(module.id)),\n };\n })\n .filter((row) => all || row.enabled);\n yield* print(rows);\n }),\n ).pipe(Command.withDescription('List plugins on this host.'));\n\n const enable = Command.make(\n 'enable',\n {\n ids: Args.String('ids').pipe(Args.withDescription('Plugin ids.'), Args.variadic({ min: 1 })),\n },\n ({ ids }) =>\n Effect.gen(function* () {\n yield* print(yield* invokeOperation('org.dxos.operation.registry.enablePlugins', { ids }));\n }),\n ).pipe(Command.withDescription('Enable plugins (with their dependencies).'));\n\n const disable = Command.make(\n 'disable',\n {\n ids: Args.String('ids').pipe(Args.withDescription('Plugin ids.'), Args.variadic({ min: 1 })),\n },\n ({ ids }) =>\n Effect.gen(function* () {\n yield* print(yield* invokeOperation('org.dxos.operation.registry.disablePlugins', { ids }));\n }),\n ).pipe(Command.withDescription('Disable plugins (with their enabled dependents).'));\n\n const ops = Command.make(\n 'ops',\n {\n filter: Args.String('filter').pipe(\n Args.withDescription('Substring filter on the key.'),\n Args.variadic({ max: 1 }),\n ),\n },\n ({ filter }) =>\n Effect.gen(function* () {\n const capabilities = (yield* Plugin.Service).capabilities;\n const needle = filter[0]?.toLowerCase();\n const keys = new Set<string>();\n for (const set of capabilities.getAll(Capabilities.OperationHandler)) {\n for (const definition of set.definitions()) {\n const key = normalizeKey(definition.meta.key);\n if (!needle || key.toLowerCase().includes(needle)) {\n keys.add(key);\n }\n }\n }\n yield* print([...keys].sort());\n }),\n ).pipe(Command.withDescription('List invokable operations.'));\n\n const invoke = Command.make(\n 'invoke',\n {\n key: Args.String('key').pipe(Args.withDescription('Operation key (bare or dxn: form).')),\n input: Args.String('input').pipe(Args.withDescription('JSON input; defaults to {}.'), Args.variadic({ max: 1 })),\n space: Flag.String('space').pipe(\n Flag.optional,\n Flag.withDescription('Space id, for operations that declare a database service.'),\n ),\n },\n ({ key, input, space }) =>\n Effect.gen(function* () {\n const parsed: unknown = input[0] ? JSON.parse(input[0]) : {};\n const spaceId = space._tag === 'Some' ? SpaceId.make(space.value) : undefined;\n yield* print(yield* invokeOperation(key, parsed, spaceId));\n }),\n ).pipe(Command.withDescription('Invoke an operation with a JSON payload.'));\n\n const evaluate = Command.make(\n 'eval',\n {\n code: Args.String('code').pipe(Args.withDescription('JavaScript to evaluate.'), Args.variadic({ min: 1 })),\n },\n ({ code }) =>\n Effect.gen(function* () {\n yield* print(yield* Effect.promise(() => evalSnippet(code.join(' '))));\n }),\n ).pipe(Command.withDescription('Evaluate a snippet with `dxos` and `composer` in scope.'));\n\n const report = Command.make(\n 'report',\n {\n title: Args.String('title').pipe(Args.withDescription('Issue title.'), Args.variadic({ min: 1 })),\n body: Flag.String('body').pipe(Flag.optional, Flag.withDescription('Issue body; defaults to the title.')),\n type: Flag.String('type').pipe(Flag.optional, Flag.withDescription('bug | feature.')),\n severity: Flag.String('severity').pipe(\n Flag.optional,\n Flag.withDescription('\"High priority\" | \"Medium priority\" | \"Low priority\".'),\n ),\n label: Flag.String('label').pipe(\n Flag.optional,\n Flag.withDescription(`Linear label; defaults to \"${REPORT_LABEL}\".`),\n ),\n noLogs: Flag.Boolean('no-logs').pipe(Flag.withDefault(false), Flag.withDescription('Skip the debug log dump.')),\n },\n ({ title, body, type, severity, label, noLogs }) =>\n Effect.gen(function* () {\n const heading = title.join(' ');\n const result = yield* invokeOperation('org.dxos.operation.support.submitIssue', {\n report: {\n title: heading,\n // The report schema requires a description, so a bare `report <title>` repeats the title.\n body: body._tag === 'Some' && body.value.trim() ? body.value : heading,\n ...(type._tag === 'Some' ? { type: type.value } : {}),\n ...(severity._tag === 'Some' ? { severity: severity.value } : {}),\n labels: [label._tag === 'Some' ? label.value : REPORT_LABEL],\n includeLogs: !noLogs,\n },\n });\n const issue = result as { issueIdentifier?: string; issueUrl?: string } | undefined;\n yield* print(issue?.issueUrl ? `${issue.issueIdentifier} ${issue.issueUrl}` : result);\n }),\n ).pipe(Command.withDescription('File a Linear issue with the logs attached.'), Command.unlisted);\n\n const port = Command.make(\n 'port',\n {\n action: Args.String('action').pipe(\n Args.withDescription('start | stop; omit for status.'),\n Args.variadic({ max: 1 }),\n ),\n },\n ({ action }) =>\n Effect.gen(function* () {\n const controller = getDebugPortController();\n switch (action[0]) {\n case 'start': {\n const session = controller.start({ persist: true });\n yield* print(`Session: ${session}`);\n break;\n }\n case 'stop': {\n controller.stop();\n yield* print('Stopped.');\n break;\n }\n default: {\n yield* print(controller.getStatus());\n }\n }\n }),\n ).pipe(Command.withDescription('Agent debug port: status, start, stop.'));\n\n return Command.make('debug').pipe(\n Command.withDescription('Composer debug console.'),\n Command.withSubcommands([snapshot, plugins, enable, disable, ops, invoke, evaluate, report, port]),\n );\n};\n\nexport const createDebugCli = (manager: PluginManager.PluginManager, options?: DebugCliOptions): DebugCli => ({\n command: makeCommand(options),\n layer: Layer.mergeAll(\n Layer.succeed(Plugin.Service, manager),\n Layer.succeed(Capability.Service, manager.capabilities),\n ),\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { useCallback, useMemo, useRef } from 'react';\n\nimport * as PluginManagerProvider from '@dxos/app-framework/PluginManagerProvider';\nimport { Terminal, type TerminalApi } from '@dxos/react-ui-terminal';\nimport * as Button from '@dxos/react-ui/Button';\nimport * as Hooks from '@dxos/react-ui/Hooks';\nimport * as Panel from '@dxos/react-ui/Panel';\nimport * as SystemButton from '@dxos/react-ui/SystemButton';\nimport * as Toolbar from '@dxos/react-ui/Toolbar';\n\nimport { meta } from '#meta';\n\nimport { createDebugCli } from './cli.ts';\n\nconst BOLD = '\\x1b[1m';\nconst DIM = '\\x1b[2m';\nconst RESET = '\\x1b[0m';\n\n/** Sizes a host that has no size of its own; a host with a definite size passes `fit` instead. */\nconst FIXED_GRID = { cols: 100, rows: 24 };\n\nconst BANNER = `${BOLD}Debug console${RESET}\\n${DIM}snapshot · plugins · enable · disable · ops · invoke · eval · port — \"help\" for details.${RESET}`;\n\nexport type DebugConsoleProps = {\n /** Rendered as a close button in the toolbar when provided (the popover host closes itself). */\n onClose?: () => void;\n /** Fits the terminal to its container; without it the fixed grid sizes a content-sized host. */\n fit?: boolean;\n};\n\n/**\n * The debug console: the introspection surface an agent drives over the debug port (operations,\n * snapshot, plugin management, eval), as an interactive Effect-CLI terminal.\n */\nexport const DebugConsole = ({ onClose, fit }: DebugConsoleProps) => {\n const { t } = Hooks.useTranslation(meta.profile.key);\n const manager = PluginManagerProvider.usePluginManager();\n const apiRef = useRef<TerminalApi | null>(null);\n const lastResultRef = useRef('');\n const cli = useMemo(\n () =>\n createDebugCli(manager, {\n onResult: (text) => {\n lastResultRef.current = text;\n },\n }),\n [manager],\n );\n\n const handleClear = useCallback(() => {\n apiRef.current?.clear();\n apiRef.current?.focus();\n }, []);\n\n return (\n <Panel.Root>\n <Panel.Body>\n <Terminal\n ref={apiRef}\n command={cli.command}\n layer={cli.layer}\n name='debug'\n banner={BANNER}\n dimensions={fit ? undefined : FIXED_GRID}\n />\n </Panel.Body>\n <Panel.Footer>\n <Toolbar.Root classNames='bg-transparent'>\n <Button.Root\n variant='ghost'\n iconOnly\n icon='ph--eraser--regular'\n label={t('console.clear.label')}\n onClick={handleClear}\n />\n <SystemButton.Clipboard\n variant='ghost'\n iconOnly\n label={t('console.copy.label')}\n onCopy={() => lastResultRef.current}\n />\n <Toolbar.Separator />\n {onClose && <SystemButton.Close variant='ghost' iconOnly onClick={onClose} />}\n </Toolbar.Root>\n </Panel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UAAU,sBAAsB,iBAAiB;CACvD,MAAM,SAAS,OAA2B,IAAI;CAC9C,MAAM,gBAAgB,OAAO,EAAE;CAC/B,MAAM,MAAM,cAER,eAAe,SAAS,EACtB,WAAW,SAAS;EAClB,cAAc,UAAU;CAC1B,EACF,CAAC,GACH,CAAC,OAAO,CACV;CAEA,MAAM,cAAc,kBAAkB;EACpC,OAAO,SAAS,MAAM;EACtB,OAAO,SAAS,MAAM;CACxB,GAAG,CAAC,CAAC;CAEL,OACE,qBAAC,MAAM,MAAP,EAAA,UAAA,CACE,oBAAC,MAAM,MAAP,EAAA,UACE,oBAAC,UAAD;EACE,KAAK;EACL,SAAS,IAAI;EACb,OAAO,IAAI;EACX,MAAK;EACL,QAAQ;EACR,YAAY,MAAM,KAAA,IAAY;CAC/B,CAAA,EACS,CAAA,GACZ,oBAAC,MAAM,QAAP,EAAA,UACE,qBAAC,QAAQ,MAAT;EAAc,YAAW;EAAzB,UAAA;GACE,oBAAC,OAAO,MAAR;IACE,SAAQ;IACR,UAAA;IACA,MAAK;IACL,OAAO,EAAE,qBAAqB;IAC9B,SAAS;GACV,CAAA;GACD,oBAAC,aAAa,WAAd;IACE,SAAQ;IACR,UAAA;IACA,OAAO,EAAE,oBAAoB;IAC7B,cAAc,cAAc;GAC7B,CAAA;GACD,oBAAC,QAAQ,WAAT,CAAoB,CAAA;GACnB,WAAW,oBAAC,aAAa,OAAd;IAAoB,SAAQ;IAAQ,UAAA;IAAS,SAAS;GAAU,CAAA;EAChE;CACF,CAAA,EAAA,CAAA,CACJ,EAAA,CAAA;AAEhB;AAEA,aAAa,cAAc"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { useMemo, useState } from "react";
|
|
2
1
|
import { Filter, Json, Obj, Query } from "@dxos/echo";
|
|
3
|
-
import {
|
|
2
|
+
import { useMemo, useState } from "react";
|
|
4
3
|
import { mx } from "@dxos/ui-theme";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as Panel from "@dxos/react-ui/Panel";
|
|
6
|
+
import * as Toolbar from "@dxos/react-ui/Toolbar";
|
|
6
7
|
import { ObjectsTree } from "@dxos/devtools";
|
|
7
8
|
import { useQuery } from "@dxos/echo-react";
|
|
8
9
|
import { Syntax } from "@dxos/react-ui-syntax-highlighter";
|
|
10
|
+
import * as ScrollArea from "@dxos/react-ui/ScrollArea";
|
|
9
11
|
//#region src/containers/DebugObjectPanel/DebugObjectPanel.tsx
|
|
10
12
|
var DebugObjectPanel = ({ role, companionTo, onOpen, canOpen }) => {
|
|
11
13
|
const db = Obj.getDatabase(companionTo);
|
|
@@ -16,15 +18,12 @@ var DebugObjectPanel = ({ role, companionTo, onOpen, canOpen }) => {
|
|
|
16
18
|
companionTo.id
|
|
17
19
|
]);
|
|
18
20
|
const [selectedObject] = useQuery(db, selectionQuery);
|
|
19
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ jsxs(Panel.Root, {
|
|
20
22
|
role,
|
|
21
|
-
children: [/* @__PURE__ */ jsx(Panel.Toolbar, {
|
|
22
|
-
asChild: true,
|
|
23
|
-
children: /* @__PURE__ */ jsx(Toolbar.Root, {})
|
|
24
|
-
}), /* @__PURE__ */ jsx(Panel.Content, {
|
|
23
|
+
children: [/* @__PURE__ */ jsx(Panel.Header, { children: /* @__PURE__ */ jsx(Toolbar.Root, {}) }), /* @__PURE__ */ jsx(Panel.Body, {
|
|
25
24
|
asChild: true,
|
|
26
25
|
children: /* @__PURE__ */ jsxs("div", {
|
|
27
|
-
className: mx("grid divide-y divide-
|
|
26
|
+
className: mx("grid divide-y divide-separator-subtle", db && "grid-rows-[1fr_2fr]"),
|
|
28
27
|
children: [db && /* @__PURE__ */ jsx(ScrollArea.Root, { children: /* @__PURE__ */ jsx(ScrollArea.Viewport, { children: /* @__PURE__ */ jsx(ObjectsTree, {
|
|
29
28
|
db,
|
|
30
29
|
root: companionTo,
|
|
@@ -37,20 +36,17 @@ var DebugObjectPanel = ({ role, companionTo, onOpen, canOpen }) => {
|
|
|
37
36
|
db,
|
|
38
37
|
depth
|
|
39
38
|
}) : void 0,
|
|
40
|
-
children: /* @__PURE__ */ jsxs(Panel.Root, { children: [/* @__PURE__ */ jsx(Panel.Toolbar, {
|
|
41
|
-
|
|
42
|
-
children: /* @__PURE__ */
|
|
43
|
-
|
|
44
|
-
children: [/* @__PURE__ */ jsx(Syntax.Filter, {}), /* @__PURE__ */ jsx(Syntax.Depth, {})]
|
|
45
|
-
})
|
|
46
|
-
}), /* @__PURE__ */ jsx(Panel.Content, {
|
|
39
|
+
children: /* @__PURE__ */ jsxs(Panel.Root, { children: [/* @__PURE__ */ jsx(Panel.Header, { children: /* @__PURE__ */ jsxs(Toolbar.Root, {
|
|
40
|
+
classNames: "grid grid-cols-[1fr_6rem]",
|
|
41
|
+
children: [/* @__PURE__ */ jsx(Syntax.Filter, {}), /* @__PURE__ */ jsx(Syntax.Depth, {})]
|
|
42
|
+
}) }), /* @__PURE__ */ jsx(Panel.Body, {
|
|
47
43
|
asChild: true,
|
|
48
44
|
children: /* @__PURE__ */ jsx(Syntax.Viewport, { children: /* @__PURE__ */ jsx(Syntax.Code, {}) })
|
|
49
45
|
})] })
|
|
50
46
|
})]
|
|
51
47
|
})
|
|
52
48
|
})]
|
|
53
|
-
})
|
|
49
|
+
});
|
|
54
50
|
};
|
|
55
51
|
DebugObjectPanel.displayName = "DebugObjectPanel";
|
|
56
52
|
//#endregion
|
|
@@ -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
|
|
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 * as AppSurface from '@dxos/app-toolkit/AppSurface';\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 { Syntax } from '@dxos/react-ui-syntax-highlighter';\nimport * as Panel from '@dxos/react-ui/Panel';\nimport * as ScrollArea from '@dxos/react-ui/ScrollArea';\nimport * as Toolbar from '@dxos/react-ui/Toolbar';\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 <Panel.Root role={role}>\n <Panel.Header>\n <Toolbar.Root />\n </Panel.Header>\n <Panel.Body asChild>\n <div className={mx('grid divide-y divide-separator-subtle', 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.Header>\n <Toolbar.Root classNames='grid grid-cols-[1fr_6rem]'>\n <Syntax.Filter />\n <Syntax.Depth />\n </Toolbar.Root>\n </Panel.Header>\n <Panel.Body asChild>\n <Syntax.Viewport>\n <Syntax.Code />\n </Syntax.Viewport>\n </Panel.Body>\n </Panel.Root>\n </Syntax.Root>\n </div>\n </Panel.Body>\n </Panel.Root>\n );\n};\n\nDebugObjectPanel.displayName = 'DebugObjectPanel';\n"],"mappings":";;;;;;;;;;;AAyBA,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,qBAAC,MAAM,MAAP;EAAkB;EAAlB,UAAA,CACE,oBAAC,MAAM,QAAP,EAAA,UACE,oBAAC,QAAQ,MAAT,CAAe,CAAA,EACH,CAAA,GACd,oBAAC,MAAM,MAAP;GAAY,SAAA;GACV,UAAA,qBAAC,OAAD;IAAK,WAAW,GAAG,yCAAyC,MAAM,qBAAqB;IAAvF,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,QAAP,EAAA,UACE,qBAAC,QAAQ,MAAT;MAAc,YAAW;MAAzB,UAAA,CACE,oBAAC,OAAO,QAAR,CAAgB,CAAA,GAChB,oBAAC,OAAO,OAAR,CAAe,CAAA,CACH;KACF,CAAA,EAAA,CAAA,GACd,oBAAC,MAAM,MAAP;MAAY,SAAA;MACV,UAAA,oBAAC,OAAO,UAAR,EAAA,UACE,oBAAC,OAAO,MAAR,CAAc,CAAA,EACC,CAAA;KACP,CAAA,CACF,EAAA,CAAA;IACD,CAAA,CACV;;EACK,CAAA,CACF;;AAEhB;AAEA,iBAAiB,cAAc"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { n as DebugPanel, r as useDebugPanelContext, t as DebugPanelHeader } from "./chunk-DebugPanelHeader.mjs";
|
|
2
|
+
import { t as DEBUG_PANEL_CONTEXT } from "./chunk-view-state.mjs";
|
|
3
|
+
import { meta } from "#meta";
|
|
4
|
+
import { useCallback } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import * as Hooks from "@dxos/app-framework/Hooks";
|
|
7
|
+
import * as LayoutOperation from "@dxos/app-toolkit/LayoutOperation";
|
|
8
|
+
import * as UiHooks from "@dxos/react-ui/Hooks";
|
|
9
|
+
import * as Panel from "@dxos/react-ui/Panel";
|
|
10
|
+
import * as Toolbar from "@dxos/react-ui/Toolbar";
|
|
11
|
+
//#region src/containers/DebugPanelDrawer/DebugPanelDrawer.tsx
|
|
12
|
+
/**
|
|
13
|
+
* The debug panel docked as the deck's bottom drawer: a title bar over the tree and the page. It
|
|
14
|
+
* shares the floating window's context, so floating it keeps the tool that was open.
|
|
15
|
+
*/
|
|
16
|
+
var DebugPanelDrawer = ({ contextId = DEBUG_PANEL_CONTEXT }) => /* @__PURE__ */ jsx(DebugPanel.Root, {
|
|
17
|
+
contextId,
|
|
18
|
+
children: /* @__PURE__ */ jsx(DebugPanelDrawerContent, {})
|
|
19
|
+
});
|
|
20
|
+
DebugPanelDrawer.displayName = "DebugPanelDrawer";
|
|
21
|
+
var DebugPanelDrawerContent = () => {
|
|
22
|
+
const { t } = UiHooks.useTranslation(meta.profile.key);
|
|
23
|
+
const { mode, setMode } = useDebugPanelContext();
|
|
24
|
+
const { invokePromise } = Hooks.useOperationInvoker();
|
|
25
|
+
const handleModeChange = useCallback((next) => {
|
|
26
|
+
invokePromise(LayoutOperation.UpdateDrawer, { state: next === "floating" ? "closed" : "open" });
|
|
27
|
+
setMode(next);
|
|
28
|
+
}, [invokePromise, setMode]);
|
|
29
|
+
const handleClose = useCallback(() => void invokePromise(LayoutOperation.UpdateDrawer, { state: "closed" }), [invokePromise]);
|
|
30
|
+
return /* @__PURE__ */ jsxs(Panel.Root, { children: [/* @__PURE__ */ jsx(Panel.Header, { children: /* @__PURE__ */ jsxs(Toolbar.Root, {
|
|
31
|
+
size: "sm",
|
|
32
|
+
children: [/* @__PURE__ */ jsx(Toolbar.Text, {
|
|
33
|
+
classNames: "grow",
|
|
34
|
+
children: t("debug-panel.title")
|
|
35
|
+
}), /* @__PURE__ */ jsx(DebugPanelHeader, {
|
|
36
|
+
mode,
|
|
37
|
+
onModeChange: handleModeChange,
|
|
38
|
+
onClose: handleClose
|
|
39
|
+
})]
|
|
40
|
+
}) }), /* @__PURE__ */ jsx(Panel.Body, {
|
|
41
|
+
classNames: "grid",
|
|
42
|
+
children: /* @__PURE__ */ jsx(DebugPanel.Body, {})
|
|
43
|
+
})] });
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { DebugPanelDrawer };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=chunk-DebugPanelDrawer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-DebugPanelDrawer.mjs","names":[],"sources":["../../src/containers/DebugPanelDrawer/DebugPanelDrawer.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport * as Hooks from '@dxos/app-framework/Hooks';\nimport * as LayoutOperation from '@dxos/app-toolkit/LayoutOperation';\nimport * as UiHooks from '@dxos/react-ui/Hooks';\nimport * as Panel from '@dxos/react-ui/Panel';\nimport * as Toolbar from '@dxos/react-ui/Toolbar';\n\nimport { meta } from '#meta';\n\nimport {\n DEBUG_PANEL_CONTEXT,\n DebugPanel,\n DebugPanelHeader,\n type DebugPanelMode,\n useDebugPanelContext,\n} from '../DebugPanel/index.ts';\n\nexport type DebugPanelDrawerProps = {\n /** Overridable so a story gets its own selection rather than the app's. */\n contextId?: string;\n};\n\n/**\n * The debug panel docked as the deck's bottom drawer: a title bar over the tree and the page. It\n * shares the floating window's context, so floating it keeps the tool that was open.\n */\nexport const DebugPanelDrawer = ({ contextId = DEBUG_PANEL_CONTEXT }: DebugPanelDrawerProps) => (\n <DebugPanel.Root contextId={contextId}>\n <DebugPanelDrawerContent />\n </DebugPanel.Root>\n);\n\nDebugPanelDrawer.displayName = 'DebugPanelDrawer';\n\nconst DebugPanelDrawerContent = () => {\n const { t } = UiHooks.useTranslation(meta.profile.key);\n const { mode, setMode } = useDebugPanelContext();\n const { invokePromise } = Hooks.useOperationInvoker();\n\n // Floating asks the drawer to close so the window the status bar opens on the mode change does\n // not stay over it; docking keeps it open.\n const handleModeChange = useCallback(\n (next: DebugPanelMode) => {\n void invokePromise(LayoutOperation.UpdateDrawer, { state: next === 'floating' ? 'closed' : 'open' });\n setMode(next);\n },\n [invokePromise, setMode],\n );\n const handleClose = useCallback(\n () => void invokePromise(LayoutOperation.UpdateDrawer, { state: 'closed' }),\n [invokePromise],\n );\n\n return (\n <Panel.Root>\n <Panel.Header>\n <Toolbar.Root size='sm'>\n <Toolbar.Text classNames='grow'>{t('debug-panel.title')}</Toolbar.Text>\n <DebugPanelHeader mode={mode} onModeChange={handleModeChange} onClose={handleClose} />\n </Toolbar.Root>\n </Panel.Header>\n <Panel.Body classNames='grid'>\n <DebugPanel.Body />\n </Panel.Body>\n </Panel.Root>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA+BA,IAAa,oBAAoB,EAAE,YAAY,0BAC7C,oBAAC,WAAW,MAAZ;CAA4B;CAC1B,UAAA,oBAAC,yBAAD,CAA0B,CAAA;AACX,CAAA;AAGnB,iBAAiB,cAAc;AAE/B,IAAM,gCAAgC;CACpC,MAAM,EAAE,MAAM,QAAQ,eAAe,KAAK,QAAQ,GAAG;CACrD,MAAM,EAAE,MAAM,YAAY,qBAAqB;CAC/C,MAAM,EAAE,kBAAkB,MAAM,oBAAoB;CAIpD,MAAM,mBAAmB,aACtB,SAAyB;EACxB,cAAmB,gBAAgB,cAAc,EAAE,OAAO,SAAS,aAAa,WAAW,OAAO,CAAC;EACnG,QAAQ,IAAI;CACd,GACA,CAAC,eAAe,OAAO,CACzB;CACA,MAAM,cAAc,kBACZ,KAAK,cAAc,gBAAgB,cAAc,EAAE,OAAO,SAAS,CAAC,GAC1E,CAAC,aAAa,CAChB;CAEA,OACE,qBAAC,MAAM,MAAP,EAAA,UAAA,CACE,oBAAC,MAAM,QAAP,EAAA,UACE,qBAAC,QAAQ,MAAT;EAAc,MAAK;EAAnB,UAAA,CACE,oBAAC,QAAQ,MAAT;GAAc,YAAW;GAAQ,UAAA,EAAE,mBAAmB;EAAgB,CAAA,GACtE,oBAAC,kBAAD;GAAwB;GAAM,cAAc;GAAkB,SAAS;EAAc,CAAA,CACzE;CACF,CAAA,EAAA,CAAA,GACd,oBAAC,MAAM,MAAP;EAAY,YAAW;EACrB,UAAA,oBAAC,WAAW,MAAZ,CAAkB,CAAA;CACR,CAAA,CACF,EAAA,CAAA;AAEhB"}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { n as debugPanelAspect, t as DEBUG_PANEL_CONTEXT } from "./chunk-view-state.mjs";
|
|
2
|
+
import { DebugNodes, DebugSurface } from "#types";
|
|
3
|
+
import { meta } from "#meta";
|
|
4
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
5
|
+
import * as Button from "@dxos/react-ui/Button";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import * as Atom from "effect/reactivity/Atom";
|
|
8
|
+
import * as Surface from "@dxos/app-framework/Surface";
|
|
9
|
+
import * as ToolkitHooks from "@dxos/app-toolkit/Hooks";
|
|
10
|
+
import * as Hooks from "@dxos/react-ui/Hooks";
|
|
11
|
+
import { useManager, useViewState, useViewStateActions } from "@dxos/react-ui-attention";
|
|
12
|
+
import * as Splitter from "@dxos/react-ui/Splitter";
|
|
13
|
+
import * as AppGraph from "@dxos/app-graph/AppGraph";
|
|
14
|
+
import * as GraphHooks from "@dxos/plugin-graph/Hooks";
|
|
15
|
+
import * as Status from "@dxos/react-ui/Status";
|
|
16
|
+
import { Path, Tree } from "@dxos/react-ui-list";
|
|
17
|
+
//#region src/containers/DebugPanel/DebugPanelContext.ts
|
|
18
|
+
var DebugPanelContext = createContext(null);
|
|
19
|
+
var useDebugPanelContext = () => {
|
|
20
|
+
const value = useContext(DebugPanelContext);
|
|
21
|
+
if (!value) throw new Error("Missing DebugPanelContext");
|
|
22
|
+
return value;
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/containers/DebugPanel/DebugPanelMain.tsx
|
|
26
|
+
/** Pages that stay mounted once visited: their buffers are the point of the tool. */
|
|
27
|
+
var KEEP_MOUNTED = /* @__PURE__ */ new Set([DebugNodes.Console, DebugNodes.Logs]);
|
|
28
|
+
/**
|
|
29
|
+
* The selected page. The console and log viewer stay mounted (hidden) once visited so they keep
|
|
30
|
+
* their buffers while another tool is shown; every other page mounts only while selected.
|
|
31
|
+
*/
|
|
32
|
+
var DebugPanelMain = () => {
|
|
33
|
+
const { t } = Hooks.useTranslation(meta.profile.key);
|
|
34
|
+
const { contextId, nodeId, select } = useDebugPanelContext();
|
|
35
|
+
const { graph } = ToolkitHooks.useAppGraph();
|
|
36
|
+
const handleNavigate = useCallback((target) => {
|
|
37
|
+
AppGraph.expandPath(graph, target);
|
|
38
|
+
select(target);
|
|
39
|
+
}, [graph, select]);
|
|
40
|
+
const node = GraphHooks.useNode(graph, nodeId);
|
|
41
|
+
const keepMounted = node !== void 0 && KEEP_MOUNTED.has(node.data);
|
|
42
|
+
const [visited, setVisited] = useState([]);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (nodeId && keepMounted) setVisited((prev) => prev.includes(nodeId) ? prev : [...prev, nodeId]);
|
|
45
|
+
}, [nodeId, keepMounted]);
|
|
46
|
+
if (!nodeId) return /* @__PURE__ */ jsx(Status.Empty, { children: t("debug-panel.empty.label") });
|
|
47
|
+
const mounted = keepMounted && !visited.includes(nodeId) ? [...visited, nodeId] : visited;
|
|
48
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [mounted.map((id) => /* @__PURE__ */ jsx(DebugPanelPage, {
|
|
49
|
+
graph,
|
|
50
|
+
contextId,
|
|
51
|
+
nodeId: id,
|
|
52
|
+
hidden: id !== nodeId,
|
|
53
|
+
onNavigate: handleNavigate
|
|
54
|
+
}, id)), !mounted.includes(nodeId) && /* @__PURE__ */ jsx(DebugPanelPage, {
|
|
55
|
+
graph,
|
|
56
|
+
contextId,
|
|
57
|
+
nodeId,
|
|
58
|
+
hidden: false,
|
|
59
|
+
onNavigate: handleNavigate
|
|
60
|
+
}, nodeId)] });
|
|
61
|
+
};
|
|
62
|
+
DebugPanelMain.displayName = "DebugPanel.Main";
|
|
63
|
+
/** One tool's article surface; the `div` is its show/hide element, not layout. */
|
|
64
|
+
var DebugPanelPage = ({ graph, contextId, nodeId, hidden, onNavigate }) => {
|
|
65
|
+
const { t } = Hooks.useTranslation(meta.profile.key);
|
|
66
|
+
const node = GraphHooks.useNode(graph, nodeId);
|
|
67
|
+
const data = useMemo(() => node && {
|
|
68
|
+
attendableId: `${contextId}/${nodeId}`,
|
|
69
|
+
nodeId,
|
|
70
|
+
subject: node.data,
|
|
71
|
+
properties: node.properties,
|
|
72
|
+
onNavigate
|
|
73
|
+
}, [
|
|
74
|
+
node,
|
|
75
|
+
contextId,
|
|
76
|
+
nodeId,
|
|
77
|
+
onNavigate
|
|
78
|
+
]);
|
|
79
|
+
if (!data) return hidden ? null : /* @__PURE__ */ jsx(Status.Empty, { children: t("debug-panel.empty.label") });
|
|
80
|
+
return /* @__PURE__ */ jsx("div", {
|
|
81
|
+
role: "none",
|
|
82
|
+
className: "dx-expand",
|
|
83
|
+
hidden,
|
|
84
|
+
children: /* @__PURE__ */ jsx(Surface.Surface, {
|
|
85
|
+
type: DebugSurface.Page,
|
|
86
|
+
data,
|
|
87
|
+
limit: 1
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/containers/DebugPanel/DebugPanelSidebar.tsx
|
|
93
|
+
var ROOT_PATH = [DebugNodes.DEBUG_ROOT_ID];
|
|
94
|
+
/** The node and every ancestor under the debug root, so each level's connector runs. */
|
|
95
|
+
var lineage = (nodeId) => {
|
|
96
|
+
const segments = nodeId.split("/");
|
|
97
|
+
return segments.map((_, index) => segments.slice(0, index + 1).join("/")).filter((id) => id.startsWith(DebugNodes.DEBUG_ROOT_ID));
|
|
98
|
+
};
|
|
99
|
+
/** Page ids the panel persisted before the pages lived under the Debug node. */
|
|
100
|
+
var LEGACY_PAGE_IDS = {
|
|
101
|
+
[`${DebugNodes.DEBUG_ROOT_ID}/${DebugNodes.nodeId(DebugNodes.Console)}`]: DebugNodes.CONSOLE_NODE_ID,
|
|
102
|
+
[`${DebugNodes.DEBUG_ROOT_ID}/${DebugNodes.nodeId(DebugNodes.Logs)}`]: DebugNodes.LOGS_NODE_ID
|
|
103
|
+
};
|
|
104
|
+
/** The tree over the hidden `root/debug` category: every developer tool, selected here and shown in `Main`. */
|
|
105
|
+
var DebugPanelSidebar = () => {
|
|
106
|
+
const { t } = Hooks.useTranslation(meta.profile.key);
|
|
107
|
+
const { contextId, nodeId, open, select, setOpen } = useDebugPanelContext();
|
|
108
|
+
const { graph } = ToolkitHooks.useAppGraph();
|
|
109
|
+
const manager = useManager();
|
|
110
|
+
const stateAtom = useMemo(() => manager.atom(debugPanelAspect, contextId), [manager, contextId]);
|
|
111
|
+
const state = useMemo(() => ({
|
|
112
|
+
itemOpen: (path) => Atom.make((get) => get(stateAtom).open.includes(Path.create(...path))).pipe(Atom.keepAlive),
|
|
113
|
+
itemCurrent: (path) => Atom.make((get) => get(stateAtom).nodeId === path[path.length - 1]).pipe(Atom.keepAlive)
|
|
114
|
+
}), [stateAtom]);
|
|
115
|
+
const model = GraphHooks.useGraphTreeModel(DebugNodes.DEBUG_ROOT_ID, state);
|
|
116
|
+
const latestRef = useRef({
|
|
117
|
+
open,
|
|
118
|
+
nodeId
|
|
119
|
+
});
|
|
120
|
+
latestRef.current = {
|
|
121
|
+
open,
|
|
122
|
+
nodeId
|
|
123
|
+
};
|
|
124
|
+
useEffect(() => {
|
|
125
|
+
AppGraph.expandSync(graph, DebugNodes.DEBUG_ROOT_ID, "child");
|
|
126
|
+
const { open, nodeId } = latestRef.current;
|
|
127
|
+
if (!nodeId && open.length === 0) {
|
|
128
|
+
setOpen(Path.create(DebugNodes.DEBUG_ROOT_ID, contextId, DebugNodes.DEBUG_NODE_ID), true);
|
|
129
|
+
select(DebugNodes.CONSOLE_NODE_ID);
|
|
130
|
+
}
|
|
131
|
+
const legacy = nodeId ? LEGACY_PAGE_IDS[nodeId] : void 0;
|
|
132
|
+
if (legacy) select(legacy);
|
|
133
|
+
for (const key of open) AppGraph.expandSync(graph, Path.last(key), "child");
|
|
134
|
+
for (const id of lineage(legacy ?? nodeId ?? DebugNodes.CONSOLE_NODE_ID)) AppGraph.expandSync(graph, id, "child");
|
|
135
|
+
}, [
|
|
136
|
+
graph,
|
|
137
|
+
contextId,
|
|
138
|
+
select,
|
|
139
|
+
setOpen
|
|
140
|
+
]);
|
|
141
|
+
const handleOpenChange = useCallback(({ item, path, open }) => {
|
|
142
|
+
setOpen(Path.create(...path), open);
|
|
143
|
+
AppGraph.expandSync(graph, item.id, "child");
|
|
144
|
+
}, [graph, setOpen]);
|
|
145
|
+
const handleSelect = useCallback(({ item, path }) => {
|
|
146
|
+
if (item.data === null) {
|
|
147
|
+
const key = Path.create(...path);
|
|
148
|
+
setOpen(key, !open.includes(key));
|
|
149
|
+
AppGraph.expandSync(graph, item.id, "child");
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
select(item.id);
|
|
153
|
+
AppGraph.expandSync(graph, item.id, "child");
|
|
154
|
+
}, [
|
|
155
|
+
graph,
|
|
156
|
+
open,
|
|
157
|
+
select,
|
|
158
|
+
setOpen
|
|
159
|
+
]);
|
|
160
|
+
return /* @__PURE__ */ jsxs(Tree.Root, {
|
|
161
|
+
id: contextId,
|
|
162
|
+
rootId: DebugNodes.DEBUG_ROOT_ID,
|
|
163
|
+
path: ROOT_PATH,
|
|
164
|
+
model,
|
|
165
|
+
size: "sm",
|
|
166
|
+
onOpenChange: handleOpenChange,
|
|
167
|
+
onSelect: handleSelect,
|
|
168
|
+
children: [/* @__PURE__ */ jsx(Tree.Label, {
|
|
169
|
+
srOnly: true,
|
|
170
|
+
children: t("debug-panel.tree.label")
|
|
171
|
+
}), /* @__PURE__ */ jsx(Tree.Content, {})]
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
DebugPanelSidebar.displayName = "DebugPanel.Sidebar";
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region src/containers/DebugPanel/DebugPanel.tsx
|
|
177
|
+
/**
|
|
178
|
+
* The debug surface in parts, so a host places the tree and the page where the room is — the
|
|
179
|
+
* floating window and the deck's drawer both split them under a title bar. `Root` owns the
|
|
180
|
+
* selection, the expanded branches and the mode, persisted so a debugging session survives the
|
|
181
|
+
* reloads it provokes.
|
|
182
|
+
*/
|
|
183
|
+
var DebugPanelRoot = ({ contextId = DEBUG_PANEL_CONTEXT, children }) => {
|
|
184
|
+
const { nodeId, open, mode = "docked" } = useViewState(debugPanelAspect, contextId);
|
|
185
|
+
const { update } = useViewStateActions(debugPanelAspect, contextId);
|
|
186
|
+
const select = useCallback((nodeId) => update((prev) => ({
|
|
187
|
+
...prev,
|
|
188
|
+
nodeId
|
|
189
|
+
})), [update]);
|
|
190
|
+
const setOpen = useCallback((pathKey, isOpen) => update((prev) => ({
|
|
191
|
+
...prev,
|
|
192
|
+
open: isOpen ? [.../* @__PURE__ */ new Set([...prev.open, pathKey])] : prev.open.filter((key) => key !== pathKey)
|
|
193
|
+
})), [update]);
|
|
194
|
+
const setMode = useCallback((mode) => update((prev) => ({
|
|
195
|
+
...prev,
|
|
196
|
+
mode
|
|
197
|
+
})), [update]);
|
|
198
|
+
const value = useMemo(() => ({
|
|
199
|
+
contextId,
|
|
200
|
+
nodeId,
|
|
201
|
+
open,
|
|
202
|
+
mode,
|
|
203
|
+
select,
|
|
204
|
+
setOpen,
|
|
205
|
+
setMode
|
|
206
|
+
}), [
|
|
207
|
+
contextId,
|
|
208
|
+
nodeId,
|
|
209
|
+
open,
|
|
210
|
+
mode,
|
|
211
|
+
select,
|
|
212
|
+
setOpen,
|
|
213
|
+
setMode
|
|
214
|
+
]);
|
|
215
|
+
return /* @__PURE__ */ jsx(DebugPanelContext.Provider, {
|
|
216
|
+
value,
|
|
217
|
+
children
|
|
218
|
+
});
|
|
219
|
+
};
|
|
220
|
+
DebugPanelRoot.displayName = "DebugPanel.Root";
|
|
221
|
+
/** The tree's opening width (rem): a navtree sidebar's, so tool labels read at the scale they do there. */
|
|
222
|
+
var SIDEBAR_SIZE = 16;
|
|
223
|
+
/** The tree beside the selected tool's page, split the same way in every host. */
|
|
224
|
+
var DebugPanelBody = () => /* @__PURE__ */ jsxs(Splitter.Root, {
|
|
225
|
+
orientation: "horizontal",
|
|
226
|
+
anchor: "start",
|
|
227
|
+
resizable: true,
|
|
228
|
+
defaultSize: SIDEBAR_SIZE,
|
|
229
|
+
minSize: 8,
|
|
230
|
+
children: [
|
|
231
|
+
/* @__PURE__ */ jsx(Splitter.Panel, {
|
|
232
|
+
position: "start",
|
|
233
|
+
children: /* @__PURE__ */ jsx(DebugPanelSidebar, {})
|
|
234
|
+
}),
|
|
235
|
+
/* @__PURE__ */ jsx(Splitter.ResizeTrigger, {}),
|
|
236
|
+
/* @__PURE__ */ jsx(Splitter.Panel, {
|
|
237
|
+
position: "end",
|
|
238
|
+
children: /* @__PURE__ */ jsx(DebugPanelMain, {})
|
|
239
|
+
})
|
|
240
|
+
]
|
|
241
|
+
});
|
|
242
|
+
DebugPanelBody.displayName = "DebugPanel.Body";
|
|
243
|
+
var DebugPanel = {
|
|
244
|
+
Root: DebugPanelRoot,
|
|
245
|
+
Body: DebugPanelBody,
|
|
246
|
+
Sidebar: DebugPanelSidebar,
|
|
247
|
+
Main: DebugPanelMain
|
|
248
|
+
};
|
|
249
|
+
//#endregion
|
|
250
|
+
//#region src/containers/DebugPanel/DebugPanelHeader.tsx
|
|
251
|
+
/**
|
|
252
|
+
* The title-bar controls both hosts share: the dock/float switch, and a close for a host without one
|
|
253
|
+
* of its own. The button says what it does next, so the icon flips with the mode.
|
|
254
|
+
*/
|
|
255
|
+
var DebugPanelHeader = ({ mode, onModeChange, onClose, size }) => {
|
|
256
|
+
const { t } = Hooks.useTranslation(meta.profile.key);
|
|
257
|
+
const floating = mode === "floating";
|
|
258
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button.Root, {
|
|
259
|
+
variant: "ghost",
|
|
260
|
+
size,
|
|
261
|
+
iconOnly: true,
|
|
262
|
+
icon: floating ? "ph--arrow-square-in--regular" : "ph--arrow-square-out--regular",
|
|
263
|
+
label: floating ? t("dock-panel.label") : t("float-panel.label"),
|
|
264
|
+
"data-testid": "debugPanel.mode",
|
|
265
|
+
onClick: () => onModeChange(floating ? "docked" : "floating")
|
|
266
|
+
}), onClose && /* @__PURE__ */ jsx(Button.Root, {
|
|
267
|
+
variant: "ghost",
|
|
268
|
+
size,
|
|
269
|
+
iconOnly: true,
|
|
270
|
+
icon: "ph--x--regular",
|
|
271
|
+
label: t("close-panel.label"),
|
|
272
|
+
"data-testid": "debugPanel.close",
|
|
273
|
+
onClick: onClose
|
|
274
|
+
})] });
|
|
275
|
+
};
|
|
276
|
+
DebugPanelHeader.displayName = "DebugPanelHeader";
|
|
277
|
+
//#endregion
|
|
278
|
+
export { DebugPanel as n, useDebugPanelContext as r, DebugPanelHeader as t };
|
|
279
|
+
|
|
280
|
+
//# sourceMappingURL=chunk-DebugPanelHeader.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-DebugPanelHeader.mjs","names":[],"sources":["../../src/containers/DebugPanel/DebugPanelContext.ts","../../src/containers/DebugPanel/DebugPanelMain.tsx","../../src/containers/DebugPanel/DebugPanelSidebar.tsx","../../src/containers/DebugPanel/DebugPanel.tsx","../../src/containers/DebugPanel/DebugPanelHeader.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type DebugPanelMode } from './view-state.ts';\n\n// Kept out of `DebugPanel.tsx`: the sidebar and main parts read the context the root provides, and\n// a module importing its own importers is a cycle.\n\nexport type DebugPanelContextValue = {\n contextId: string;\n /** Qualified id of the selected page. */\n nodeId?: string;\n /** Joined paths of the expanded branches. */\n open: readonly string[];\n /** Where the panel is hosted; the hosts read it to decide which of them shows. */\n mode: DebugPanelMode;\n select: (nodeId: string) => void;\n setOpen: (pathKey: string, open: boolean) => void;\n setMode: (mode: DebugPanelMode) => void;\n};\n\nexport const DebugPanelContext = createContext<DebugPanelContextValue | null>(null);\n\nexport const useDebugPanelContext = (): DebugPanelContextValue => {\n const value = useContext(DebugPanelContext);\n if (!value) {\n throw new Error('Missing DebugPanelContext');\n }\n return value;\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport * as Surface from '@dxos/app-framework/Surface';\nimport * as AppGraph from '@dxos/app-graph/AppGraph';\nimport * as ToolkitHooks from '@dxos/app-toolkit/Hooks';\nimport * as GraphHooks from '@dxos/plugin-graph/Hooks';\nimport * as Hooks from '@dxos/react-ui/Hooks';\nimport * as Status from '@dxos/react-ui/Status';\n\nimport { meta } from '#meta';\nimport { DebugNodes, DebugSurface } from '#types';\n\nimport { useDebugPanelContext } from './DebugPanelContext.ts';\n\n/** Pages that stay mounted once visited: their buffers are the point of the tool. */\nconst KEEP_MOUNTED: ReadonlySet<unknown> = new Set([DebugNodes.Console, DebugNodes.Logs]);\n\n/**\n * The selected page. The console and log viewer stay mounted (hidden) once visited so they keep\n * their buffers while another tool is shown; every other page mounts only while selected.\n */\nexport const DebugPanelMain = () => {\n const { t } = Hooks.useTranslation(meta.profile.key);\n const { contextId, nodeId, select } = useDebugPanelContext();\n const { graph } = ToolkitHooks.useAppGraph();\n const handleNavigate = useCallback(\n (target: string) => {\n AppGraph.expandPath(graph, target);\n select(target);\n },\n [graph, select],\n );\n const node = GraphHooks.useNode(graph, nodeId);\n const keepMounted = node !== undefined && KEEP_MOUNTED.has(node.data);\n const [visited, setVisited] = useState<string[]>([]);\n useEffect(() => {\n if (nodeId && keepMounted) {\n // Guarded in the updater: StrictMode runs the effect twice on mount, and two appends would mount the page twice.\n setVisited((prev) => (prev.includes(nodeId) ? prev : [...prev, nodeId]));\n }\n }, [nodeId, keepMounted]);\n\n if (!nodeId) {\n return <Status.Empty>{t('debug-panel.empty.label')}</Status.Empty>;\n }\n\n // Appended in the same render it is selected (the effect only catches up), so the keyed page is\n // never first mounted as the transient one and then remounted.\n const mounted = keepMounted && !visited.includes(nodeId) ? [...visited, nodeId] : visited;\n\n return (\n <>\n {mounted.map((id) => (\n <DebugPanelPage\n key={id}\n graph={graph}\n contextId={contextId}\n nodeId={id}\n hidden={id !== nodeId}\n onNavigate={handleNavigate}\n />\n ))}\n {!mounted.includes(nodeId) && (\n <DebugPanelPage\n key={nodeId}\n graph={graph}\n contextId={contextId}\n nodeId={nodeId}\n hidden={false}\n onNavigate={handleNavigate}\n />\n )}\n </>\n );\n};\n\nDebugPanelMain.displayName = 'DebugPanel.Main';\n\ntype DebugPanelPageProps = {\n graph: AppGraph.ReadableGraph;\n contextId: string;\n nodeId: string;\n hidden: boolean;\n onNavigate: (nodeId: string) => void;\n};\n\n/** One tool's article surface; the `div` is its show/hide element, not layout. */\nconst DebugPanelPage = ({ graph, contextId, nodeId, hidden, onNavigate }: DebugPanelPageProps) => {\n const { t } = Hooks.useTranslation(meta.profile.key);\n const node = GraphHooks.useNode(graph, nodeId);\n const data = useMemo<DebugSurface.PageData | undefined>(\n () =>\n node && {\n attendableId: `${contextId}/${nodeId}`,\n nodeId,\n subject: node.data,\n properties: node.properties,\n onNavigate,\n },\n [node, contextId, nodeId, onNavigate],\n );\n if (!data) {\n // A persisted id that no longer resolves (a plugin disabled) shows the empty state rather than nothing.\n return hidden ? null : <Status.Empty>{t('debug-panel.empty.label')}</Status.Empty>;\n }\n\n return (\n <div role='none' className='dx-expand' hidden={hidden}>\n <Surface.Surface type={DebugSurface.Page} data={data} limit={1} />\n </div>\n );\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Atom from 'effect/reactivity/Atom';\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport * as AppGraph from '@dxos/app-graph/AppGraph';\nimport type * as AppGraphNode from '@dxos/app-graph/AppGraphNode';\nimport * as ToolkitHooks from '@dxos/app-toolkit/Hooks';\nimport * as GraphHooks from '@dxos/plugin-graph/Hooks';\nimport { useManager } from '@dxos/react-ui-attention';\nimport { Path, Tree, type TreeSelectEvent } from '@dxos/react-ui-list';\nimport * as Hooks from '@dxos/react-ui/Hooks';\n\nimport { meta } from '#meta';\nimport { DebugNodes } from '#types';\n\nimport { useDebugPanelContext } from './DebugPanelContext.ts';\nimport { debugPanelAspect } from './view-state.ts';\n\nconst ROOT_PATH = [DebugNodes.DEBUG_ROOT_ID];\n\n/** The node and every ancestor under the debug root, so each level's connector runs. */\nconst lineage = (nodeId: string): string[] => {\n const segments = nodeId.split('/');\n return segments\n .map((_, index) => segments.slice(0, index + 1).join('/'))\n .filter((id) => id.startsWith(DebugNodes.DEBUG_ROOT_ID));\n};\n\n/** Page ids the panel persisted before the pages lived under the Debug node. */\nconst LEGACY_PAGE_IDS: Record<string, string> = {\n [`${DebugNodes.DEBUG_ROOT_ID}/${DebugNodes.nodeId(DebugNodes.Console)}`]: DebugNodes.CONSOLE_NODE_ID,\n [`${DebugNodes.DEBUG_ROOT_ID}/${DebugNodes.nodeId(DebugNodes.Logs)}`]: DebugNodes.LOGS_NODE_ID,\n};\n\n/** The tree over the hidden `root/debug` category: every developer tool, selected here and shown in `Main`. */\nexport const DebugPanelSidebar = () => {\n const { t } = Hooks.useTranslation(meta.profile.key);\n const { contextId, nodeId, open, select, setOpen } = useDebugPanelContext();\n const { graph } = ToolkitHooks.useAppGraph();\n const manager = useManager();\n // The model reads state through atoms, and the manager's atom for this context is that state.\n const stateAtom = useMemo(() => manager.atom(debugPanelAspect, contextId), [manager, contextId]);\n const state = useMemo(\n () => ({\n itemOpen: (path: string[]) =>\n Atom.make((get) => get(stateAtom).open.includes(Path.create(...path))).pipe(Atom.keepAlive),\n itemCurrent: (path: string[]) =>\n Atom.make((get) => get(stateAtom).nodeId === path[path.length - 1]).pipe(Atom.keepAlive),\n }),\n [stateAtom],\n );\n const model = GraphHooks.useGraphTreeModel(DebugNodes.DEBUG_ROOT_ID, state);\n\n // Persisted state names nodes whose children come from connectors that only run on expansion, so\n // without this an open branch restores empty and a nested selection restores to a blank page. A\n // pristine panel opens on the console, as it did when the console was its first tab. The latest\n // state is read through a ref so the restore runs once per context, not on every change.\n const latestRef = useRef({ open, nodeId });\n latestRef.current = { open, nodeId };\n useEffect(() => {\n AppGraph.expandSync(graph, DebugNodes.DEBUG_ROOT_ID, 'child');\n const { open, nodeId } = latestRef.current;\n if (!nodeId && open.length === 0) {\n setOpen(Path.create(DebugNodes.DEBUG_ROOT_ID, contextId, DebugNodes.DEBUG_NODE_ID), true);\n select(DebugNodes.CONSOLE_NODE_ID);\n }\n // The console and logs pages moved under the Debug node; a selection persisted at their old\n // top-level ids is carried to the new ones.\n const legacy = nodeId ? LEGACY_PAGE_IDS[nodeId] : undefined;\n if (legacy) {\n select(legacy);\n }\n for (const key of open) {\n AppGraph.expandSync(graph, Path.last(key), 'child');\n }\n for (const id of lineage(legacy ?? nodeId ?? DebugNodes.CONSOLE_NODE_ID)) {\n AppGraph.expandSync(graph, id, 'child');\n }\n }, [graph, contextId, select, setOpen]);\n\n const handleOpenChange = useCallback(\n ({ item, path, open }: { item: AppGraphNode.Node; path: string[]; open: boolean }) => {\n setOpen(Path.create(...path), open);\n AppGraph.expandSync(graph, item.id, 'child');\n },\n [graph, setOpen],\n );\n\n const handleSelect = useCallback(\n ({ item, path }: TreeSelectEvent<AppGraphNode.Node>) => {\n if (item.data === null) {\n // A branch has no page: selecting it toggles it.\n const key = Path.create(...path);\n setOpen(key, !open.includes(key));\n AppGraph.expandSync(graph, item.id, 'child');\n return;\n }\n select(item.id);\n AppGraph.expandSync(graph, item.id, 'child');\n },\n [graph, open, select, setOpen],\n );\n\n return (\n <Tree.Root\n id={contextId}\n rootId={DebugNodes.DEBUG_ROOT_ID}\n path={ROOT_PATH}\n model={model}\n size='sm'\n onOpenChange={handleOpenChange}\n onSelect={handleSelect}\n >\n <Tree.Label srOnly>{t('debug-panel.tree.label')}</Tree.Label>\n <Tree.Content />\n </Tree.Root>\n );\n};\n\nDebugPanelSidebar.displayName = 'DebugPanel.Sidebar';\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { type PropsWithChildren, useCallback, useMemo } from 'react';\n\nimport { useViewState, useViewStateActions } from '@dxos/react-ui-attention';\nimport * as Splitter from '@dxos/react-ui/Splitter';\n\nimport { DebugPanelContext, type DebugPanelContextValue } from './DebugPanelContext.ts';\nimport { DebugPanelMain } from './DebugPanelMain.tsx';\nimport { DebugPanelSidebar } from './DebugPanelSidebar.tsx';\nimport { DEBUG_PANEL_CONTEXT, type DebugPanelMode, debugPanelAspect } from './view-state.ts';\n\nexport type DebugPanelRootProps = PropsWithChildren<{\n /** Overridable so a second host (or a story) gets its own selection rather than the rail's. */\n contextId?: string;\n}>;\n\n/**\n * The debug surface in parts, so a host places the tree and the page where the room is — the\n * floating window and the deck's drawer both split them under a title bar. `Root` owns the\n * selection, the expanded branches and the mode, persisted so a debugging session survives the\n * reloads it provokes.\n */\nconst DebugPanelRoot = ({ contextId = DEBUG_PANEL_CONTEXT, children }: DebugPanelRootProps) => {\n const { nodeId, open, mode = 'docked' } = useViewState(debugPanelAspect, contextId);\n const { update } = useViewStateActions(debugPanelAspect, contextId);\n const select = useCallback((nodeId: string) => update((prev) => ({ ...prev, nodeId })), [update]);\n const setOpen = useCallback(\n (pathKey: string, isOpen: boolean) =>\n update((prev) => ({\n ...prev,\n open: isOpen ? [...new Set([...prev.open, pathKey])] : prev.open.filter((key) => key !== pathKey),\n })),\n [update],\n );\n const setMode = useCallback((mode: DebugPanelMode) => update((prev) => ({ ...prev, mode })), [update]);\n const value = useMemo<DebugPanelContextValue>(\n () => ({ contextId, nodeId, open, mode, select, setOpen, setMode }),\n [contextId, nodeId, open, mode, select, setOpen, setMode],\n );\n\n return <DebugPanelContext.Provider value={value}>{children}</DebugPanelContext.Provider>;\n};\n\nDebugPanelRoot.displayName = 'DebugPanel.Root';\n\n/** The tree's opening width (rem): a navtree sidebar's, so tool labels read at the scale they do there. */\nconst SIDEBAR_SIZE = 16;\n\n/** The tree beside the selected tool's page, split the same way in every host. */\nconst DebugPanelBody = () => (\n <Splitter.Root orientation='horizontal' anchor='start' resizable defaultSize={SIDEBAR_SIZE} minSize={8}>\n <Splitter.Panel position='start'>\n <DebugPanelSidebar />\n </Splitter.Panel>\n <Splitter.ResizeTrigger />\n <Splitter.Panel position='end'>\n <DebugPanelMain />\n </Splitter.Panel>\n </Splitter.Root>\n);\n\nDebugPanelBody.displayName = 'DebugPanel.Body';\n\nexport const DebugPanel = {\n Root: DebugPanelRoot,\n Body: DebugPanelBody,\n Sidebar: DebugPanelSidebar,\n Main: DebugPanelMain,\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport React from 'react';\n\nimport * as Button from '@dxos/react-ui/Button';\nimport * as Hooks from '@dxos/react-ui/Hooks';\n\nimport { meta } from '#meta';\n\nimport { type DebugPanelMode } from './view-state.ts';\n\nexport type DebugPanelHeaderProps = Pick<Button.RootProps, 'size'> & {\n mode: DebugPanelMode;\n onModeChange: (mode: DebugPanelMode) => void;\n /** Omitted where the host brings its own close (the floating window's `CloseTrigger`). */\n onClose?: () => void;\n};\n\n/**\n * The title-bar controls both hosts share: the dock/float switch, and a close for a host without one\n * of its own. The button says what it does next, so the icon flips with the mode.\n */\nexport const DebugPanelHeader = ({ mode, onModeChange, onClose, size }: DebugPanelHeaderProps) => {\n const { t } = Hooks.useTranslation(meta.profile.key);\n const floating = mode === 'floating';\n return (\n <>\n <Button.Root\n variant='ghost'\n size={size}\n iconOnly\n icon={floating ? 'ph--arrow-square-in--regular' : 'ph--arrow-square-out--regular'}\n label={floating ? t('dock-panel.label') : t('float-panel.label')}\n data-testid='debugPanel.mode'\n onClick={() => onModeChange(floating ? 'docked' : 'floating')}\n />\n {onClose && (\n <Button.Root\n variant='ghost'\n size={size}\n iconOnly\n icon='ph--x--regular'\n label={t('close-panel.label')}\n data-testid='debugPanel.close'\n onClick={onClose}\n />\n )}\n </>\n );\n};\n\nDebugPanelHeader.displayName = 'DebugPanelHeader';\n"],"mappings":";;;;;;;;;;;;;;;;;AAwBA,IAAa,oBAAoB,cAA6C,IAAI;AAElF,IAAa,6BAAqD;CAChE,MAAM,QAAQ,WAAW,iBAAiB;CAC1C,IAAI,CAAC,OACH,MAAM,IAAI,MAAM,2BAA2B;CAE7C,OAAO;AACT;;;;ACbA,IAAM,+BAAqC,IAAI,IAAI,CAA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