@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,167 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback, useEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
6
|
+
|
|
7
|
+
import * as Hooks from '@dxos/app-framework/Hooks';
|
|
8
|
+
import * as LayoutOperation from '@dxos/app-toolkit/LayoutOperation';
|
|
9
|
+
import * as StatusBar from '@dxos/plugin-status-bar/StatusBar';
|
|
10
|
+
import { type DebugPortController, getDebugPortController } from '@dxos/react-client/devtools';
|
|
11
|
+
import { useViewState, useViewStateActions } from '@dxos/react-ui-attention';
|
|
12
|
+
import * as Button from '@dxos/react-ui/Button';
|
|
13
|
+
import * as FloatingPanel from '@dxos/react-ui/FloatingPanel';
|
|
14
|
+
import * as UiHooks from '@dxos/react-ui/Hooks';
|
|
15
|
+
|
|
16
|
+
import { meta } from '#meta';
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
DEBUG_PANEL_CONTEXT,
|
|
20
|
+
DebugPanel,
|
|
21
|
+
DebugPanelHeader,
|
|
22
|
+
type DebugPanelMode,
|
|
23
|
+
debugPanelAspect,
|
|
24
|
+
} from '../DebugPanel/index.ts';
|
|
25
|
+
|
|
26
|
+
/** Room for the log table to breathe; the console fits itself to whatever it is given. */
|
|
27
|
+
const DEFAULT_SIZE: FloatingPanel.Size = { width: 1024, height: 384 };
|
|
28
|
+
|
|
29
|
+
const MIN_SIZE: FloatingPanel.Size = { width: 480, height: 240 };
|
|
30
|
+
|
|
31
|
+
/** Clear of the status bar the panel opens from. */
|
|
32
|
+
const MARGIN = 8;
|
|
33
|
+
|
|
34
|
+
export type DebugPanelStatusProps = {
|
|
35
|
+
/** Injectable for stories/tests; defaults to the page-wide controller. */
|
|
36
|
+
controller?: DebugPortController;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Status-bar button showing the debug panel: docked, it toggles the deck's bottom drawer; floating,
|
|
41
|
+
* it opens the panel as a window over the whole app — dragged, resized, folded to its title bar as
|
|
42
|
+
* the session needs, and left where it was put across reloads. The red dot marks a live agent debug
|
|
43
|
+
* port — an agent can evaluate code in this page — so it must be visible without opening settings.
|
|
44
|
+
*/
|
|
45
|
+
export const DebugPanelStatus = ({ controller = getDebugPortController() }: DebugPanelStatusProps) => {
|
|
46
|
+
const { t } = UiHooks.useTranslation(meta.profile.key);
|
|
47
|
+
const subscribe = useCallback((listener: () => void) => controller.subscribe(listener), [controller]);
|
|
48
|
+
const getStatus = useCallback(() => controller.getStatus(), [controller]);
|
|
49
|
+
const status = useSyncExternalStore(subscribe, getStatus);
|
|
50
|
+
const { invokePromise } = Hooks.useOperationInvoker();
|
|
51
|
+
|
|
52
|
+
const { position, size = DEFAULT_SIZE, mode = 'docked' } = useViewState(debugPanelAspect, DEBUG_PANEL_CONTEXT);
|
|
53
|
+
const { update } = useViewStateActions(debugPanelAspect, DEBUG_PANEL_CONTEXT);
|
|
54
|
+
const label = status.running ? t('debug-port-status.running.label') : t('open-debug-panel.label');
|
|
55
|
+
|
|
56
|
+
// Owned here rather than by the window so the drawer's float control can open it: the drawer
|
|
57
|
+
// only flips the persisted mode, and a docked-to-floating flip while mounted is that request.
|
|
58
|
+
const [floatingOpen, setFloatingOpen] = useState(false);
|
|
59
|
+
const previousModeRef = useRef(mode);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (previousModeRef.current === 'docked' && mode === 'floating') {
|
|
62
|
+
setFloatingOpen(true);
|
|
63
|
+
}
|
|
64
|
+
previousModeRef.current = mode;
|
|
65
|
+
}, [mode]);
|
|
66
|
+
|
|
67
|
+
const handleToggleDrawer = useCallback(
|
|
68
|
+
() => void invokePromise(LayoutOperation.UpdateDrawer, { state: 'toggle' }),
|
|
69
|
+
[invokePromise],
|
|
70
|
+
);
|
|
71
|
+
// Docking moves the panel: the window closes before the drawer opens so the two never show at once.
|
|
72
|
+
const handleModeChange = useCallback(
|
|
73
|
+
(next: DebugPanelMode) => {
|
|
74
|
+
setFloatingOpen(false);
|
|
75
|
+
update((prev) => ({ ...prev, mode: next }));
|
|
76
|
+
if (next === 'docked') {
|
|
77
|
+
void invokePromise(LayoutOperation.UpdateDrawer, { state: 'open' });
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
[update, invokePromise],
|
|
81
|
+
);
|
|
82
|
+
const handlePositionChangeEnd = useCallback(
|
|
83
|
+
({ position }: { position: FloatingPanel.Point }) => update((prev) => ({ ...prev, position })),
|
|
84
|
+
[update],
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
const handleSizeChangeEnd = useCallback(
|
|
88
|
+
({ size }: { size: FloatingPanel.Size }) => update((prev) => ({ ...prev, size })),
|
|
89
|
+
[update],
|
|
90
|
+
);
|
|
91
|
+
// First opening: centred above the status bar, where the popover it replaces used to sit. A
|
|
92
|
+
// persisted position wins from then on.
|
|
93
|
+
const getAnchorPosition = useCallback(
|
|
94
|
+
({ triggerRect, boundaryRect }: { triggerRect: DOMRect | null; boundaryRect: DOMRect | null }) => {
|
|
95
|
+
if (position) {
|
|
96
|
+
return position;
|
|
97
|
+
}
|
|
98
|
+
const bounds = boundaryRect ?? new DOMRect(0, 0, window.innerWidth, window.innerHeight);
|
|
99
|
+
const bottom = triggerRect?.top ?? bounds.bottom;
|
|
100
|
+
return {
|
|
101
|
+
x: Math.max(0, bounds.left + (bounds.width - size.width) / 2),
|
|
102
|
+
y: Math.max(0, bottom - size.height - MARGIN),
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
[position, size],
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<FloatingPanel.Root
|
|
110
|
+
open={mode === 'floating' && floatingOpen}
|
|
111
|
+
onOpenChange={({ open }) => setFloatingOpen(open)}
|
|
112
|
+
defaultSize={size}
|
|
113
|
+
minSize={MIN_SIZE}
|
|
114
|
+
getAnchorPosition={getAnchorPosition}
|
|
115
|
+
persistRect
|
|
116
|
+
closeOnEscape
|
|
117
|
+
onPositionChangeEnd={handlePositionChangeEnd}
|
|
118
|
+
onSizeChangeEnd={handleSizeChangeEnd}
|
|
119
|
+
>
|
|
120
|
+
{/* IconButton is the direct trigger child so the trigger ref/handlers/ARIA attach to the button, not the container. */}
|
|
121
|
+
<StatusBar.Item classNames='relative'>
|
|
122
|
+
{mode === 'floating' ? (
|
|
123
|
+
<FloatingPanel.Trigger asChild>
|
|
124
|
+
<Button.Root variant='ghost' icon='ph--terminal-window--regular' iconOnly label={label} />
|
|
125
|
+
</FloatingPanel.Trigger>
|
|
126
|
+
) : (
|
|
127
|
+
<Button.Root
|
|
128
|
+
variant='ghost'
|
|
129
|
+
icon='ph--terminal-window--regular'
|
|
130
|
+
iconOnly
|
|
131
|
+
label={label}
|
|
132
|
+
onClick={handleToggleDrawer}
|
|
133
|
+
/>
|
|
134
|
+
)}
|
|
135
|
+
{status.running && (
|
|
136
|
+
<span
|
|
137
|
+
role='status'
|
|
138
|
+
aria-label={t('debug-port-status.running.label')}
|
|
139
|
+
data-testid='debugPlugin.portIndicator'
|
|
140
|
+
className='absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-red-500 pointer-events-none'
|
|
141
|
+
/>
|
|
142
|
+
)}
|
|
143
|
+
</StatusBar.Item>
|
|
144
|
+
<FloatingPanel.Content>
|
|
145
|
+
<DebugPanel.Root>
|
|
146
|
+
<FloatingPanel.Header classNames='pl-1'>
|
|
147
|
+
<FloatingPanel.DragTrigger>
|
|
148
|
+
<FloatingPanel.Title>{t('debug-panel.title')}</FloatingPanel.Title>
|
|
149
|
+
</FloatingPanel.DragTrigger>
|
|
150
|
+
{/* Fold and restore only: a debug panel over the whole app is a window the reader would resize. */}
|
|
151
|
+
<FloatingPanel.Control>
|
|
152
|
+
<DebugPanelHeader mode={mode} onModeChange={handleModeChange} size='sm' />
|
|
153
|
+
<FloatingPanel.StageTrigger stage='minimized' />
|
|
154
|
+
<FloatingPanel.StageTrigger stage='default' />
|
|
155
|
+
<FloatingPanel.CloseTrigger />
|
|
156
|
+
</FloatingPanel.Control>
|
|
157
|
+
</FloatingPanel.Header>
|
|
158
|
+
<FloatingPanel.Body classNames='grid'>
|
|
159
|
+
<DebugPanel.Body />
|
|
160
|
+
</FloatingPanel.Body>
|
|
161
|
+
</DebugPanel.Root>
|
|
162
|
+
</FloatingPanel.Content>
|
|
163
|
+
</FloatingPanel.Root>
|
|
164
|
+
);
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
DebugPanelStatus.displayName = 'DebugPanelStatus';
|
|
@@ -18,7 +18,7 @@ import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
|
18
18
|
|
|
19
19
|
import { translations } from '#translations';
|
|
20
20
|
|
|
21
|
-
import { DebugPortSettings } from './DebugPortSettings';
|
|
21
|
+
import { DebugPortSettings } from './DebugPortSettings.tsx';
|
|
22
22
|
|
|
23
23
|
const DEBUG_PORT_ORIGIN = 'http://127.0.0.1:9321';
|
|
24
24
|
|
|
@@ -70,7 +70,7 @@ const createFakeController = (initial: Partial<DebugPortStatus> = {}): DebugPort
|
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
-
/** `Form.
|
|
73
|
+
/** `Form.Field` reads the form context for its variant; the section itself binds no fields. */
|
|
74
74
|
const NoFields = Schema.Struct({});
|
|
75
75
|
|
|
76
76
|
type StoryArgs = {
|
|
@@ -5,9 +5,12 @@
|
|
|
5
5
|
import React, { useCallback, useSyncExternalStore } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type DebugPortController, getDebugPortController } from '@dxos/react-client/devtools';
|
|
8
|
-
import { Flex, IconButton, Input, useTranslation } from '@dxos/react-ui';
|
|
9
8
|
import { Logger, type LogRow } from '@dxos/react-ui-debug';
|
|
10
9
|
import { Form } from '@dxos/react-ui-form';
|
|
10
|
+
import * as Field from '@dxos/react-ui/Field';
|
|
11
|
+
import * as Hooks from '@dxos/react-ui/Hooks';
|
|
12
|
+
import * as Input from '@dxos/react-ui/Input';
|
|
13
|
+
import * as Layout from '@dxos/react-ui/Layout';
|
|
11
14
|
|
|
12
15
|
import { meta } from '#meta';
|
|
13
16
|
|
|
@@ -35,7 +38,7 @@ export type DebugPortSettingsProps = {
|
|
|
35
38
|
* flipped, the session id is regenerated on every activation, and nothing survives a reload.
|
|
36
39
|
*/
|
|
37
40
|
export const DebugPortSettings = ({ controller = getDebugPortController(), disabled }: DebugPortSettingsProps) => {
|
|
38
|
-
const { t } = useTranslation(meta.profile.key);
|
|
41
|
+
const { t } = Hooks.useTranslation(meta.profile.key);
|
|
39
42
|
const subscribe = useCallback((listener: () => void) => controller.subscribe(listener), [controller]);
|
|
40
43
|
const getStatus = useCallback(() => controller.getStatus(), [controller]);
|
|
41
44
|
const status = useSyncExternalStore(subscribe, getStatus);
|
|
@@ -47,65 +50,55 @@ export const DebugPortSettings = ({ controller = getDebugPortController(), disab
|
|
|
47
50
|
[controller],
|
|
48
51
|
);
|
|
49
52
|
|
|
50
|
-
const handleCopy = useCallback(() => {
|
|
51
|
-
if (status.session) {
|
|
52
|
-
void navigator.clipboard.writeText(status.session);
|
|
53
|
-
}
|
|
54
|
-
}, [status.session]);
|
|
55
|
-
|
|
56
53
|
return (
|
|
57
|
-
<Form.
|
|
58
|
-
|
|
54
|
+
<Form.FieldSet
|
|
55
|
+
label={t('settings.debug-port.section.label')}
|
|
59
56
|
description={t('settings.debug-port.section.description')}
|
|
60
57
|
>
|
|
61
|
-
<Form.
|
|
62
|
-
<Flex gap='md' align='center'>
|
|
58
|
+
<Form.Field standalone label={t('settings.debug-port.label')} description={t('settings.debug-port.description')}>
|
|
59
|
+
<Layout.Flex gap='md' align='center'>
|
|
63
60
|
{status.running && (
|
|
64
|
-
<span className='text-sm text-
|
|
61
|
+
<span className='text-sm text-fg-muted'>
|
|
65
62
|
{t('settings.debug-port.running.label')} <span className='font-mono'>{status.origin}</span>
|
|
66
63
|
</span>
|
|
67
64
|
)}
|
|
68
|
-
<
|
|
69
|
-
<Input.Switch
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
<Field.Root>
|
|
66
|
+
<Input.Switch
|
|
67
|
+
checked={status.running}
|
|
68
|
+
disabled={disabled}
|
|
69
|
+
onCheckedChange={({ checked }) => handleToggle(checked)}
|
|
70
|
+
/>
|
|
71
|
+
</Field.Root>
|
|
72
|
+
</Layout.Flex>
|
|
73
|
+
</Form.Field>
|
|
73
74
|
|
|
74
75
|
{status.running && (
|
|
75
76
|
<>
|
|
76
|
-
<Form.
|
|
77
|
+
<Form.Field
|
|
77
78
|
standalone
|
|
78
79
|
label={t('settings.debug-port.session.label')}
|
|
79
80
|
description={t('settings.debug-port.session.description')}
|
|
80
81
|
>
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
</Flex>
|
|
90
|
-
</Form.Row>
|
|
82
|
+
<Input.Root
|
|
83
|
+
value={status.session ?? ''}
|
|
84
|
+
disabled
|
|
85
|
+
variant='mono'
|
|
86
|
+
copyable
|
|
87
|
+
aria-label={t('settings.debug-port.session.label')}
|
|
88
|
+
/>
|
|
89
|
+
</Form.Field>
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
<Form.Row
|
|
95
|
-
standalone
|
|
96
|
-
label={t('settings.debug-port.log.label')}
|
|
97
|
-
classNames='md:grid-cols-1 md:[grid-template-areas:"header""description""control""validation"]'
|
|
98
|
-
>
|
|
99
|
-
{/* Only the rows: a settings card has no room for the panel's toolbar, levels or filter. */}
|
|
91
|
+
<Form.Field standalone label={t('settings.debug-port.log.label')}>
|
|
92
|
+
{/* Only the rows: a settings card has no room for the panel's toolbar, levels or filter, so nothing to check rows for. */}
|
|
100
93
|
<Logger.Root rowFilter={isDebugPortRow}>
|
|
101
94
|
<Logger.Content classNames='max-h-[16lh]'>
|
|
102
|
-
<Logger.List />
|
|
95
|
+
<Logger.List checkable={false} />
|
|
103
96
|
</Logger.Content>
|
|
104
97
|
</Logger.Root>
|
|
105
|
-
</Form.
|
|
98
|
+
</Form.Field>
|
|
106
99
|
</>
|
|
107
100
|
)}
|
|
108
|
-
</Form.
|
|
101
|
+
</Form.FieldSet>
|
|
109
102
|
);
|
|
110
103
|
};
|
|
111
104
|
|
|
@@ -9,7 +9,7 @@ import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
|
9
9
|
|
|
10
10
|
import { translations } from '#translations';
|
|
11
11
|
|
|
12
|
-
import { DebugSettings } from './DebugSettings';
|
|
12
|
+
import { DebugSettings } from './DebugSettings.tsx';
|
|
13
13
|
|
|
14
14
|
const meta = {
|
|
15
15
|
title: 'plugins/plugin-debug/containers/DebugSettings',
|
|
@@ -6,20 +6,24 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';
|
|
8
8
|
import * as AppSpace from '@dxos/app-toolkit/AppSpace';
|
|
9
|
-
import
|
|
9
|
+
import type * as AppSurface from '@dxos/app-toolkit/AppSurface';
|
|
10
10
|
import { type ConfigInit, SaveConfig, Storage, defs } from '@dxos/config';
|
|
11
11
|
import { log } from '@dxos/log';
|
|
12
12
|
import { type IdbLogStore, MANUAL_LOG_EXPORT_MAX_BYTES } from '@dxos/log-store-idb';
|
|
13
13
|
import { useClient } from '@dxos/react-client';
|
|
14
|
-
import { IconButton, Input, Select, Toast, useFileDownload, useTranslation } from '@dxos/react-ui';
|
|
15
14
|
import { Form } from '@dxos/react-ui-form';
|
|
15
|
+
import * as Button from '@dxos/react-ui/Button';
|
|
16
|
+
import * as Hooks from '@dxos/react-ui/Hooks';
|
|
17
|
+
import * as Input from '@dxos/react-ui/Input';
|
|
18
|
+
import * as Select from '@dxos/react-ui/Select';
|
|
19
|
+
import * as UiToast from '@dxos/react-ui/Toast';
|
|
16
20
|
import { TRACE_ALL_KEY } from '@dxos/tracing';
|
|
17
|
-
import { setDeep } from '@dxos/util';
|
|
21
|
+
import { gzip, setDeep } from '@dxos/util';
|
|
18
22
|
|
|
19
23
|
import { meta } from '#meta';
|
|
20
24
|
import { Settings } from '#types';
|
|
21
25
|
|
|
22
|
-
import { DebugPortSettings } from '../DebugPortSettings';
|
|
26
|
+
import { DebugPortSettings } from '../DebugPortSettings/index.ts';
|
|
23
27
|
|
|
24
28
|
type Toast = {
|
|
25
29
|
title: string;
|
|
@@ -39,10 +43,10 @@ export type DebugSettingsProps = AppSurface.SettingsProps<
|
|
|
39
43
|
}
|
|
40
44
|
>;
|
|
41
45
|
|
|
42
|
-
export const DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }: DebugSettingsProps) => {
|
|
43
|
-
const { t } = useTranslation(meta.profile.key);
|
|
46
|
+
export const DebugSettings = ({ settings, onSettingsChange, scope, logStore, onUpload }: DebugSettingsProps) => {
|
|
47
|
+
const { t } = Hooks.useTranslation(meta.profile.key);
|
|
44
48
|
const [toast, setToast] = useState<Toast>();
|
|
45
|
-
const download = useFileDownload();
|
|
49
|
+
const download = Hooks.useFileDownload();
|
|
46
50
|
const [storageConfig, setStorageConfig] = useState<ConfigInit>({});
|
|
47
51
|
const client = useClient();
|
|
48
52
|
|
|
@@ -95,8 +99,8 @@ export const DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }
|
|
|
95
99
|
}, [client, download, handleToast, onUpload, t]);
|
|
96
100
|
|
|
97
101
|
const handleDownloadLogs = useCallback(async () => {
|
|
98
|
-
const file = await logStore.exportBlob({ maxSize: MANUAL_LOG_EXPORT_MAX_BYTES });
|
|
99
|
-
const fileName = `composer-logs-${new Date().toISOString().slice(0, 19).replace(/:/g, '-')}.ndjson`;
|
|
102
|
+
const file = await gzip(await logStore.exportBlob({ maxSize: MANUAL_LOG_EXPORT_MAX_BYTES }));
|
|
103
|
+
const fileName = `composer-logs-${new Date().toISOString().slice(0, 19).replace(/:/g, '-')}.ndjson.gz`;
|
|
100
104
|
download(file, fileName);
|
|
101
105
|
}, [download, logStore]);
|
|
102
106
|
|
|
@@ -157,96 +161,99 @@ export const DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }
|
|
|
157
161
|
<Form.Root schema={Settings.Settings} values={settings} variant='settings' readonly={!onSettingsChange}>
|
|
158
162
|
<Form.Viewport scroll>
|
|
159
163
|
<Form.Content>
|
|
160
|
-
<Form.
|
|
161
|
-
<Form.
|
|
162
|
-
<Input.
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
</Form.
|
|
175
|
-
<Form.
|
|
176
|
-
|
|
164
|
+
<Form.FieldSet label={meta.profile.name ?? meta.profile.key} actions={scope}>
|
|
165
|
+
<Form.Field label={t('settings.wireframe.label')} description={t('settings.wireframe.description')}>
|
|
166
|
+
<Input.Switch
|
|
167
|
+
disabled={!onSettingsChange}
|
|
168
|
+
checked={settings.wireframe}
|
|
169
|
+
onCheckedChange={({ checked }) => handleWireframeChange(checked)}
|
|
170
|
+
/>
|
|
171
|
+
</Form.Field>
|
|
172
|
+
<Form.Field label={t('settings.trace-all.label')} description={t('settings.trace-all.description')}>
|
|
173
|
+
<Input.Switch
|
|
174
|
+
disabled={!onSettingsChange}
|
|
175
|
+
checked={traceAll}
|
|
176
|
+
onCheckedChange={({ checked }) => handleTraceAllChange(checked)}
|
|
177
|
+
/>
|
|
178
|
+
</Form.Field>
|
|
179
|
+
<Form.Field
|
|
180
|
+
standalone
|
|
181
|
+
label={t('settings.tracing-panel.label')}
|
|
182
|
+
description={t('settings.tracing-panel.description')}
|
|
183
|
+
>
|
|
184
|
+
<Button.Root
|
|
177
185
|
icon='ph--arrow-square-out--regular'
|
|
178
186
|
iconOnly
|
|
179
187
|
label={t('settings.tracing-panel.label')}
|
|
180
188
|
onClick={handleOpenTracingPanel}
|
|
181
189
|
/>
|
|
182
|
-
</Form.
|
|
183
|
-
<Form.
|
|
190
|
+
</Form.Field>
|
|
191
|
+
<Form.Field
|
|
192
|
+
standalone
|
|
184
193
|
label={t('settings.download-diagnostics.label')}
|
|
185
194
|
description={t('settings.download-diagnostics.description')}
|
|
186
195
|
>
|
|
187
|
-
<
|
|
196
|
+
<Button.Root
|
|
188
197
|
icon='ph--download-simple--regular'
|
|
189
198
|
iconOnly
|
|
190
199
|
label={t('settings.download-diagnostics.label')}
|
|
191
200
|
onClick={handleDownload}
|
|
192
201
|
/>
|
|
193
|
-
</Form.
|
|
194
|
-
<Form.
|
|
195
|
-
|
|
202
|
+
</Form.Field>
|
|
203
|
+
<Form.Field
|
|
204
|
+
standalone
|
|
205
|
+
label={t('settings.download-logs.label')}
|
|
206
|
+
description={t('settings.download-logs.description')}
|
|
207
|
+
>
|
|
208
|
+
<Button.Root
|
|
196
209
|
icon='ph--download-simple--regular'
|
|
197
210
|
iconOnly
|
|
198
211
|
label={t('settings.download-logs.label')}
|
|
199
212
|
onClick={handleDownloadLogs}
|
|
200
213
|
/>
|
|
201
|
-
</Form.
|
|
202
|
-
<Form.
|
|
203
|
-
<
|
|
214
|
+
</Form.Field>
|
|
215
|
+
<Form.Field standalone label={t('settings.repair.label')} description={t('settings.repair.description')}>
|
|
216
|
+
<Button.Root
|
|
204
217
|
icon='ph--first-aid-kit--regular'
|
|
205
218
|
iconOnly
|
|
206
219
|
label={t('settings.repair.label')}
|
|
207
220
|
onClick={handleRepair}
|
|
208
221
|
/>
|
|
209
|
-
</Form.
|
|
222
|
+
</Form.Field>
|
|
210
223
|
|
|
211
224
|
{/* TODO(burdon): Move to layout? */}
|
|
212
225
|
{toast && (
|
|
213
|
-
<
|
|
214
|
-
<
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
{toast.description && <Toast.Description>{toast.description}</Toast.Description>}
|
|
218
|
-
</Toast.Root>
|
|
226
|
+
<UiToast.Root defaultOpen duration={5_000} onOpenChange={(open) => !open && setToast(undefined)}>
|
|
227
|
+
<UiToast.Header icon='ph--gift--duotone'>{toast.title}</UiToast.Header>
|
|
228
|
+
{toast.description && <UiToast.Description>{toast.description}</UiToast.Description>}
|
|
229
|
+
</UiToast.Root>
|
|
219
230
|
)}
|
|
220
231
|
|
|
221
|
-
<Form.
|
|
232
|
+
<Form.Field
|
|
222
233
|
label={t('settings.choose-storage-adaptor.label')}
|
|
223
234
|
description={t('settings.choose-storage-adaptor.description')}
|
|
224
235
|
>
|
|
225
236
|
<Select.Root
|
|
226
237
|
disabled={!onSettingsChange}
|
|
227
|
-
value={
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
)
|
|
231
|
-
}
|
|
232
|
-
|
|
238
|
+
value={Object.entries(StorageAdapters)
|
|
239
|
+
.filter(([_name, value]) => value === storageConfig?.runtime?.client?.storage?.dataStore)
|
|
240
|
+
.map(([name]) => name)
|
|
241
|
+
.slice(0, 1)}
|
|
242
|
+
onValueChange={({ value: [value] }) => value && handleStorageAdapterChange(value)}
|
|
243
|
+
items={Object.keys(StorageAdapters).map((key) => ({
|
|
244
|
+
value: key,
|
|
245
|
+
label: t(`settings.storage-adaptor.${key}.label`),
|
|
246
|
+
}))}
|
|
233
247
|
>
|
|
234
|
-
<Select.
|
|
235
|
-
<Select.
|
|
236
|
-
|
|
237
|
-
<Select.
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
{t(`settings.storage-adaptor.${key}.label`)}
|
|
241
|
-
</Select.Option>
|
|
242
|
-
))}
|
|
243
|
-
</Select.Viewport>
|
|
244
|
-
<Select.Arrow />
|
|
245
|
-
</Select.Content>
|
|
246
|
-
</Select.Portal>
|
|
248
|
+
<Select.Trigger disabled={!onSettingsChange} placeholder={t('settings.data-store.label')} />
|
|
249
|
+
<Select.Content>
|
|
250
|
+
{Object.keys(StorageAdapters).map((key) => (
|
|
251
|
+
<Select.Item key={key} item={{ value: key, label: t(`settings.storage-adaptor.${key}.label`) }} />
|
|
252
|
+
))}
|
|
253
|
+
</Select.Content>
|
|
247
254
|
</Select.Root>
|
|
248
|
-
</Form.
|
|
249
|
-
</Form.
|
|
255
|
+
</Form.Field>
|
|
256
|
+
</Form.FieldSet>
|
|
250
257
|
|
|
251
258
|
<DebugPortSettings disabled={!onSettingsChange} />
|
|
252
259
|
</Form.Content>
|
|
@@ -4,13 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import type * as AppSurface from '@dxos/app-toolkit/AppSurface';
|
|
8
8
|
import { ObjectsTree } from '@dxos/devtools';
|
|
9
9
|
import { type Entity, Filter, Obj, Query } from '@dxos/echo';
|
|
10
10
|
import { useQuery } from '@dxos/echo-react';
|
|
11
11
|
import { type EntityId } from '@dxos/keys';
|
|
12
|
-
import { Clipboard, Grid, Input, Panel, ScrollArea, Toolbar } from '@dxos/react-ui';
|
|
13
12
|
import { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
13
|
+
import * as Icon from '@dxos/react-ui/Icon';
|
|
14
|
+
import * as Input from '@dxos/react-ui/Input';
|
|
15
|
+
import * as Layout from '@dxos/react-ui/Layout';
|
|
16
|
+
import * as Panel from '@dxos/react-ui/Panel';
|
|
17
|
+
import * as ScrollArea from '@dxos/react-ui/ScrollArea';
|
|
18
|
+
import * as Toolbar from '@dxos/react-ui/Toolbar';
|
|
14
19
|
|
|
15
20
|
export type DebugSpaceObjectsPanelProps = AppSurface.SpaceArticleProps & {
|
|
16
21
|
onOpen?: (object: Obj.Unknown) => void;
|
|
@@ -19,38 +24,44 @@ export type DebugSpaceObjectsPanelProps = AppSurface.SpaceArticleProps & {
|
|
|
19
24
|
|
|
20
25
|
export const DebugSpaceObjectsPanel = ({ space, onOpen, canOpen }: DebugSpaceObjectsPanelProps) => {
|
|
21
26
|
const [selectedId, setSelectedId] = useState<EntityId | null>(null);
|
|
27
|
+
const [filter, setFilter] = useState('');
|
|
28
|
+
// TODO(burdon): Guard.
|
|
22
29
|
const [selectedObject] = useQuery(
|
|
23
30
|
space.db,
|
|
24
31
|
selectedId ? Query.select(Filter.id(selectedId)) : Query.select(Filter.nothing()),
|
|
25
32
|
);
|
|
26
33
|
|
|
27
34
|
return (
|
|
28
|
-
<
|
|
29
|
-
<Panel.
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
35
|
+
<Panel.Root>
|
|
36
|
+
<Panel.Header>
|
|
37
|
+
<Toolbar.Root>
|
|
38
|
+
<Input.Root
|
|
39
|
+
placeholder='Search...'
|
|
40
|
+
aria-label='Search'
|
|
41
|
+
noAutoFill
|
|
42
|
+
value={filter}
|
|
43
|
+
onChange={(event) => setFilter(event.target.value)}
|
|
44
|
+
end={<Icon.Icon icon='ph--magnifying-glass--regular' />}
|
|
45
|
+
/>
|
|
46
|
+
</Toolbar.Root>
|
|
47
|
+
</Panel.Header>
|
|
48
|
+
<Panel.Body asChild>
|
|
49
|
+
<Layout.Grid grow rows={2} classNames='divide-y divide-separator-subtle'>
|
|
50
|
+
<ScrollArea.Root>
|
|
51
|
+
<ScrollArea.Viewport>
|
|
52
|
+
<ObjectsTree
|
|
53
|
+
db={space.db}
|
|
54
|
+
filter={filter}
|
|
55
|
+
onSelect={(entity) => setSelectedId(entity.id)}
|
|
56
|
+
onOpen={onOpen}
|
|
57
|
+
canOpen={canOpen}
|
|
58
|
+
/>
|
|
59
|
+
</ScrollArea.Viewport>
|
|
60
|
+
</ScrollArea.Root>
|
|
61
|
+
{selectedObject && <JsonHighlighter classNames='p-1' data={selectedObject} />}
|
|
62
|
+
</Layout.Grid>
|
|
63
|
+
</Panel.Body>
|
|
64
|
+
</Panel.Root>
|
|
54
65
|
);
|
|
55
66
|
};
|
|
56
67
|
|