@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
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import React, { useEffect, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { TimeoutError } from '@dxos/async';
|
|
8
|
-
import
|
|
9
|
-
import { ConnectionState } from '@dxos/protocols/
|
|
8
|
+
import * as StatusBar from '@dxos/plugin-status-bar/StatusBar';
|
|
9
|
+
import { ConnectionState } from '@dxos/protocols/buf/dxos/client/services_pb';
|
|
10
10
|
import { useNetworkStatus } from '@dxos/react-client/mesh';
|
|
11
|
-
import
|
|
11
|
+
import * as Button from '@dxos/react-ui/Button';
|
|
12
12
|
|
|
13
13
|
const styles = {
|
|
14
14
|
success: 'text-sky-300 dark:text-green-700',
|
|
@@ -89,7 +89,7 @@ const ErrorIndicator = () => {
|
|
|
89
89
|
if (errorRef.current) {
|
|
90
90
|
return (
|
|
91
91
|
<StatusBar.Item>
|
|
92
|
-
<
|
|
92
|
+
<Button.Root
|
|
93
93
|
variant='ghost'
|
|
94
94
|
icon='ph--warning-circle--duotone'
|
|
95
95
|
iconOnly
|
|
@@ -102,7 +102,7 @@ const ErrorIndicator = () => {
|
|
|
102
102
|
} else {
|
|
103
103
|
return (
|
|
104
104
|
<StatusBar.Item>
|
|
105
|
-
<
|
|
105
|
+
<Button.Root variant='ghost' icon='ph--check--regular' iconOnly label='No errors.' />
|
|
106
106
|
</StatusBar.Item>
|
|
107
107
|
);
|
|
108
108
|
}
|
|
@@ -121,13 +121,13 @@ const SwarmIndicator = () => {
|
|
|
121
121
|
if (state === 0) {
|
|
122
122
|
return (
|
|
123
123
|
<StatusBar.Item>
|
|
124
|
-
<
|
|
124
|
+
<Button.Root variant='ghost' icon='ph--lightning--regular' iconOnly label='Connected to swarm.' />
|
|
125
125
|
</StatusBar.Item>
|
|
126
126
|
);
|
|
127
127
|
} else {
|
|
128
128
|
return (
|
|
129
129
|
<StatusBar.Item>
|
|
130
|
-
<
|
|
130
|
+
<Button.Root
|
|
131
131
|
variant='ghost'
|
|
132
132
|
icon='ph--lightning-slash--regular'
|
|
133
133
|
iconOnly
|
|
@@ -168,7 +168,7 @@ const SavingIndicator = () => {
|
|
|
168
168
|
case 2:
|
|
169
169
|
return (
|
|
170
170
|
<StatusBar.Item>
|
|
171
|
-
<
|
|
171
|
+
<Button.Root
|
|
172
172
|
variant='ghost'
|
|
173
173
|
icon='ph--circle--duotone'
|
|
174
174
|
iconOnly
|
|
@@ -180,7 +180,7 @@ const SavingIndicator = () => {
|
|
|
180
180
|
case 1:
|
|
181
181
|
return (
|
|
182
182
|
<StatusBar.Item>
|
|
183
|
-
<
|
|
183
|
+
<Button.Root
|
|
184
184
|
variant='ghost'
|
|
185
185
|
icon='ph--circle--duotone'
|
|
186
186
|
iconOnly
|
|
@@ -193,7 +193,7 @@ const SavingIndicator = () => {
|
|
|
193
193
|
default:
|
|
194
194
|
return (
|
|
195
195
|
<StatusBar.Item>
|
|
196
|
-
<
|
|
196
|
+
<Button.Root variant='ghost' icon='ph--circle--duotone' iconOnly label='Modified indicator.' />
|
|
197
197
|
</StatusBar.Item>
|
|
198
198
|
);
|
|
199
199
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { type CallMetadata, log } from '@dxos/log';
|
|
9
|
+
import { random } from '@dxos/random';
|
|
10
|
+
import { withAttention } from '@dxos/react-ui-attention/testing';
|
|
11
|
+
import * as Button from '@dxos/react-ui/Button';
|
|
12
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
13
|
+
import * as Toolbar from '@dxos/react-ui/Toolbar';
|
|
14
|
+
|
|
15
|
+
import { translations } from '#translations';
|
|
16
|
+
|
|
17
|
+
import { LoggerPanel } from './LoggerPanel.tsx';
|
|
18
|
+
|
|
19
|
+
random.seed(123);
|
|
20
|
+
|
|
21
|
+
// Workspace-relative paths so rows and the Levels popover show a derived package name.
|
|
22
|
+
const FILES = [
|
|
23
|
+
'packages/plugins/plugin-debug/src/alpha.ts',
|
|
24
|
+
'packages/ui/react-ui-debug/src/beta.ts',
|
|
25
|
+
'packages/core/echo/echo/src/gamma.ts',
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
let seq = 0;
|
|
29
|
+
|
|
30
|
+
const emit = (file: string, level: 'info' | 'warn' | 'error') => {
|
|
31
|
+
// Hand-written meta so entries appear to originate from distinct files, populating the Levels list.
|
|
32
|
+
const callMeta: CallMetadata = { F: file, L: 1, S: undefined };
|
|
33
|
+
const context =
|
|
34
|
+
level === 'error' ? { seq: ++seq, file, error: new Error('Simulated failure') } : { seq: ++seq, file };
|
|
35
|
+
log[level](random.lorem.sentences(), context, callMeta);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** The panel reads the process-wide log buffer, so the story emits into it rather than passing rows. */
|
|
39
|
+
const Render = () => (
|
|
40
|
+
<div className='grid grid-rows-[min-content_1fr] h-[24rem] w-[48rem] max-w-full'>
|
|
41
|
+
<Toolbar.Root>
|
|
42
|
+
<Button.Root onClick={() => emit(FILES[0], 'info')}>Info</Button.Root>
|
|
43
|
+
<Button.Root onClick={() => emit(FILES[1], 'warn')}>Warn</Button.Root>
|
|
44
|
+
<Button.Root onClick={() => emit(FILES[2], 'error')}>Error</Button.Root>
|
|
45
|
+
</Toolbar.Root>
|
|
46
|
+
<LoggerPanel />
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
const meta = {
|
|
51
|
+
title: 'plugins/plugin-debug/containers/LoggerPanel',
|
|
52
|
+
component: LoggerPanel,
|
|
53
|
+
render: Render,
|
|
54
|
+
decorators: [withAttention(), withTheme(), withLayout({ layout: 'centered' })],
|
|
55
|
+
parameters: { translations },
|
|
56
|
+
} satisfies Meta<typeof LoggerPanel>;
|
|
57
|
+
|
|
58
|
+
export default meta;
|
|
59
|
+
|
|
60
|
+
type Story = StoryObj<typeof meta>;
|
|
61
|
+
|
|
62
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Logger } from '@dxos/react-ui-debug';
|
|
8
|
+
import * as Panel from '@dxos/react-ui/Panel';
|
|
9
|
+
|
|
10
|
+
export const LoggerPanel = () => (
|
|
11
|
+
<Logger.Root>
|
|
12
|
+
<Panel.Root>
|
|
13
|
+
<Panel.Header>
|
|
14
|
+
<Logger.Toolbar />
|
|
15
|
+
</Panel.Header>
|
|
16
|
+
<Panel.Body asChild>
|
|
17
|
+
<Logger.Content>
|
|
18
|
+
<Logger.List />
|
|
19
|
+
</Logger.Content>
|
|
20
|
+
</Panel.Body>
|
|
21
|
+
<Panel.Footer>
|
|
22
|
+
<Logger.Filter />
|
|
23
|
+
</Panel.Footer>
|
|
24
|
+
</Panel.Root>
|
|
25
|
+
</Logger.Root>
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
LoggerPanel.displayName = 'LoggerPanel';
|
|
@@ -13,31 +13,31 @@ import { useQuery } from '@dxos/echo-react';
|
|
|
13
13
|
import { ClientPlugin, initializeIdentity } from '@dxos/plugin-client/testing';
|
|
14
14
|
import * as ProgressPlugin from '@dxos/plugin-progress/ProgressPlugin';
|
|
15
15
|
import { SpacePlugin } from '@dxos/plugin-space/testing';
|
|
16
|
-
import
|
|
16
|
+
import * as CorePlugins from '@dxos/plugin-testing/CorePlugins';
|
|
17
17
|
import * as StorybookPlugin from '@dxos/plugin-testing/StorybookPlugin';
|
|
18
18
|
import { useSpaces } from '@dxos/react-client/echo';
|
|
19
|
-
import { ScrollArea } from '@dxos/react-ui';
|
|
20
19
|
import { Listbox } from '@dxos/react-ui-list';
|
|
20
|
+
import * as ScrollArea from '@dxos/react-ui/ScrollArea';
|
|
21
21
|
import { withLayout } from '@dxos/react-ui/testing';
|
|
22
22
|
|
|
23
23
|
import { translations } from '#translations';
|
|
24
24
|
|
|
25
|
-
import { SpaceGenerator } from './SpaceGenerator';
|
|
25
|
+
import { SpaceGenerator } from './SpaceGenerator.tsx';
|
|
26
26
|
|
|
27
27
|
/** Live list of every object in the space — updates as the generator creates objects. */
|
|
28
28
|
const ObjectList = ({ space }: { space: Parameters<typeof SpaceGenerator>[0]['space'] }) => {
|
|
29
29
|
const objects = useQuery(space.db, Query.select(Filter.everything()));
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
|
-
<ScrollArea.Root
|
|
32
|
+
<ScrollArea.Root orientation='vertical'>
|
|
33
33
|
<ScrollArea.Viewport>
|
|
34
|
-
<Listbox.Root>
|
|
34
|
+
<Listbox.Root items={objects.map((object) => ({ value: object.id, label: object.id }))}>
|
|
35
35
|
<Listbox.Content>
|
|
36
36
|
{objects.map((object) => (
|
|
37
37
|
<Listbox.Item key={object.id} id={object.id} classNames='px-2 gap-2'>
|
|
38
38
|
<div className='flex flex-col grow truncate'>
|
|
39
39
|
<span className='truncate'>{Obj.getLabel(object) ?? object.id}</span>
|
|
40
|
-
<span className='text-
|
|
40
|
+
<span className='text-fg-muted text-sm truncate'>{Obj.getTypename(object)}</span>
|
|
41
41
|
</div>
|
|
42
42
|
</Listbox.Item>
|
|
43
43
|
))}
|
|
@@ -55,7 +55,7 @@ const DefaultStory = () => {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
|
-
<div className='dx-
|
|
58
|
+
<div className='dx-expand grid grid-cols-2 divide-x divide-separator'>
|
|
59
59
|
<SpaceGenerator space={space} />
|
|
60
60
|
<ObjectList space={space} />
|
|
61
61
|
</div>
|
|
@@ -69,7 +69,7 @@ const meta = {
|
|
|
69
69
|
withLayout({ layout: 'fullscreen' }),
|
|
70
70
|
withPluginManager(() => ({
|
|
71
71
|
plugins: [
|
|
72
|
-
...
|
|
72
|
+
...CorePlugins.make(),
|
|
73
73
|
StorybookPlugin.make({}),
|
|
74
74
|
// Hosts the ProgressRegistry the Progress Monitor row registers into (and its meter reads).
|
|
75
75
|
ProgressPlugin.make(),
|
|
@@ -4,31 +4,31 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import * as ActivationEvents from '@dxos/app-framework/ActivationEvents';
|
|
8
|
+
import * as Hooks from '@dxos/app-framework/Hooks';
|
|
9
|
+
import * as PluginManagerProvider from '@dxos/app-framework/PluginManagerProvider';
|
|
8
10
|
import * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';
|
|
11
|
+
import * as ToolkitHooks from '@dxos/app-toolkit/Hooks';
|
|
9
12
|
import * as LayoutOperation from '@dxos/app-toolkit/LayoutOperation';
|
|
10
|
-
import { useProgressMonitor } from '@dxos/app-toolkit/ui';
|
|
11
13
|
import { ComputeGraph } from '@dxos/conductor';
|
|
12
14
|
import { Filter, Obj, Type } from '@dxos/echo';
|
|
15
|
+
import * as EffectEx from '@dxos/effect/EffectEx';
|
|
13
16
|
import * as Drawing from '@dxos/plugin-illustrator/Drawing';
|
|
14
17
|
import * as Markdown from '@dxos/plugin-markdown/Markdown';
|
|
15
18
|
import * as Sheet from '@dxos/plugin-sheet/Sheet';
|
|
16
19
|
import * as SpaceOperation from '@dxos/plugin-space/SpaceOperation';
|
|
17
20
|
import { useClient } from '@dxos/react-client';
|
|
18
21
|
import { type Space } from '@dxos/react-client/echo';
|
|
19
|
-
import {
|
|
20
|
-
Flex,
|
|
21
|
-
IconButton,
|
|
22
|
-
Input,
|
|
23
|
-
Panel,
|
|
24
|
-
ScrollArea,
|
|
25
|
-
ThemedClassName,
|
|
26
|
-
useAsyncEffect,
|
|
27
|
-
useTranslation,
|
|
28
|
-
} from '@dxos/react-ui';
|
|
29
|
-
import { composable, composableProps } from '@dxos/react-ui';
|
|
30
22
|
import { ProgressMeter } from '@dxos/react-ui-components';
|
|
31
|
-
import { type ActionGraphProps,
|
|
23
|
+
import { type ActionGraphProps, ActionToolbar, MenuBuilder, useMenuBuilder } from '@dxos/react-ui-menu';
|
|
24
|
+
import * as Button from '@dxos/react-ui/Button';
|
|
25
|
+
import * as Field from '@dxos/react-ui/Field';
|
|
26
|
+
import * as UiHooks from '@dxos/react-ui/Hooks';
|
|
27
|
+
import * as Input from '@dxos/react-ui/Input';
|
|
28
|
+
import * as Layout from '@dxos/react-ui/Layout';
|
|
29
|
+
import * as Panel from '@dxos/react-ui/Panel';
|
|
30
|
+
import * as ScrollArea from '@dxos/react-ui/ScrollArea';
|
|
31
|
+
import * as Util from '@dxos/react-ui/Util';
|
|
32
32
|
import { Organization, Person, Task } from '@dxos/types';
|
|
33
33
|
import { mx } from '@dxos/ui-theme';
|
|
34
34
|
import { sortKeys } from '@dxos/util';
|
|
@@ -47,28 +47,45 @@ export type SpaceGeneratorProps = {
|
|
|
47
47
|
onCreateObjects?: (objects: Obj.Unknown[]) => void;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
export const SpaceGenerator = composable<HTMLDivElement, SpaceGeneratorProps>(
|
|
50
|
+
export const SpaceGenerator = Util.composable<HTMLDivElement, SpaceGeneratorProps>(
|
|
51
51
|
({ children, space, onCreateObjects, ...props }, forwardedRef) => {
|
|
52
|
-
const
|
|
53
|
-
const {
|
|
52
|
+
const invoker = Hooks.useOperationInvoker();
|
|
53
|
+
const { invokePromise } = invoker;
|
|
54
|
+
const { t } = UiHooks.useTranslation(meta.profile.key);
|
|
54
55
|
const client = useClient();
|
|
55
56
|
const [count, setCount] = useState(1);
|
|
56
57
|
const [info, setInfo] = useState<any>({});
|
|
57
58
|
const presets = useMemo(() => generator(), []);
|
|
59
|
+
const manager = PluginManagerProvider.usePluginManager();
|
|
60
|
+
const allTemplates = Hooks.useCapabilities(AppCapabilities.SpaceTemplate);
|
|
61
|
+
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
EffectEx.runDetached(manager.activate(ActivationEvents.SpaceTemplatesRequested));
|
|
64
|
+
}, [manager]);
|
|
58
65
|
|
|
59
66
|
// Register types.
|
|
60
|
-
useAsyncEffect(async () => {
|
|
67
|
+
UiHooks.useAsyncEffect(async () => {
|
|
61
68
|
await client.addTypes([...staticTypes, ...recordTypes, ...presets.schemas]);
|
|
62
69
|
}, [client, presets]);
|
|
63
70
|
|
|
64
71
|
// Create type generators.
|
|
65
72
|
const typeMap = useMemo(() => {
|
|
66
73
|
const recordGenerators = new Map<string, ObjectGenerator<any>>(
|
|
67
|
-
recordTypes.map((type) => [Type.getTypename(type), createGenerator(client,
|
|
74
|
+
recordTypes.map((type) => [Type.getTypename(type), createGenerator(client, invoker, manager, type)]),
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
const allTemplateGenerators = new Map<string, ObjectGenerator<any>>(
|
|
78
|
+
allTemplates.map((template) => [
|
|
79
|
+
template.id,
|
|
80
|
+
async (space) => {
|
|
81
|
+
await template.apply({ client, space });
|
|
82
|
+
return [];
|
|
83
|
+
},
|
|
84
|
+
]),
|
|
68
85
|
);
|
|
69
86
|
|
|
70
|
-
return new Map([...staticGenerators, ...presets.items, ...recordGenerators]);
|
|
71
|
-
}, [client, invokePromise, presets]);
|
|
87
|
+
return new Map([...staticGenerators, ...presets.items, ...recordGenerators, ...allTemplateGenerators]);
|
|
88
|
+
}, [client, invoker, invokePromise, manager, presets, allTemplates]);
|
|
72
89
|
|
|
73
90
|
// Query space to get info.
|
|
74
91
|
const updateInfo = useCallback(async () => {
|
|
@@ -98,7 +115,7 @@ export const SpaceGenerator = composable<HTMLDivElement, SpaceGeneratorProps>(
|
|
|
98
115
|
});
|
|
99
116
|
}, [space]);
|
|
100
117
|
|
|
101
|
-
useAsyncEffect(updateInfo, [updateInfo]);
|
|
118
|
+
UiHooks.useAsyncEffect(updateInfo, [updateInfo]);
|
|
102
119
|
|
|
103
120
|
// TODO(wittjosiah): Custom toast required — `notify` labels are fixed at invocation, so a
|
|
104
121
|
// result-dependent count cannot be reported through it. Drop these once operation notify
|
|
@@ -163,55 +180,62 @@ export const SpaceGenerator = composable<HTMLDivElement, SpaceGeneratorProps>(
|
|
|
163
180
|
return (
|
|
164
181
|
// `alwaysActive`: the toolbar gates itself on the menu scope's attention, and this debug panel
|
|
165
182
|
// is not an attendable surface, so without it every action renders disabled.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
<Input.Root
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
<
|
|
186
|
-
<ScrollArea.
|
|
187
|
-
<
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
183
|
+
|
|
184
|
+
<Panel.Root {...Util.composableProps(props)} ref={forwardedRef}>
|
|
185
|
+
<Panel.Header>
|
|
186
|
+
<ActionToolbar {...menuActions} alwaysActive classNames='dx-document'>
|
|
187
|
+
<Field.Root>
|
|
188
|
+
<Input.Root
|
|
189
|
+
placeholder='Count'
|
|
190
|
+
classNames='w-[4rem] text-right'
|
|
191
|
+
min={1}
|
|
192
|
+
max={100}
|
|
193
|
+
size={8}
|
|
194
|
+
value={count}
|
|
195
|
+
onChange={(event) => setCount(parseInt(event.target.value))}
|
|
196
|
+
type='number'
|
|
197
|
+
/>
|
|
198
|
+
</Field.Root>
|
|
199
|
+
</ActionToolbar>
|
|
200
|
+
</Panel.Header>
|
|
201
|
+
<Panel.Body asChild>
|
|
202
|
+
<ScrollArea.Root orientation='vertical'>
|
|
203
|
+
<ScrollArea.Viewport classNames='dx-document gap-4 divide-y divide-separator-subtle'>
|
|
204
|
+
<SchemaTable
|
|
205
|
+
classNames='py-1'
|
|
206
|
+
types={staticTypes}
|
|
207
|
+
objects={info.objects}
|
|
208
|
+
label='Static Types'
|
|
209
|
+
onClick={handleCreateData}
|
|
210
|
+
/>
|
|
211
|
+
<SchemaTable
|
|
212
|
+
classNames='py-1'
|
|
213
|
+
types={recordTypes}
|
|
214
|
+
objects={info.objects}
|
|
215
|
+
label='Record Types'
|
|
216
|
+
onClick={handleCreateData}
|
|
217
|
+
/>
|
|
218
|
+
<SchemaTable
|
|
219
|
+
classNames='py-1'
|
|
220
|
+
types={presets.types}
|
|
221
|
+
objects={info.objects}
|
|
222
|
+
label='Presets'
|
|
223
|
+
onClick={handleCreateData}
|
|
224
|
+
/>
|
|
225
|
+
{allTemplates.length > 0 && (
|
|
202
226
|
<SchemaTable
|
|
203
227
|
classNames='py-1'
|
|
204
|
-
types={
|
|
228
|
+
types={allTemplates.map(({ id, label }) => ({ typename: id, presetLabel: label }))}
|
|
205
229
|
objects={info.objects}
|
|
206
|
-
label='
|
|
230
|
+
label='Space Templates'
|
|
207
231
|
onClick={handleCreateData}
|
|
208
232
|
/>
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
</ScrollArea.
|
|
212
|
-
</
|
|
213
|
-
</Panel.
|
|
214
|
-
</
|
|
233
|
+
)}
|
|
234
|
+
<ProgressGenerator classNames='py-1' />
|
|
235
|
+
</ScrollArea.Viewport>
|
|
236
|
+
</ScrollArea.Root>
|
|
237
|
+
</Panel.Body>
|
|
238
|
+
</Panel.Root>
|
|
215
239
|
);
|
|
216
240
|
},
|
|
217
241
|
);
|
|
@@ -259,14 +283,14 @@ const useSpaceGeneratorMenu = ({
|
|
|
259
283
|
// Stable key for the test progress monitor within the shared registry.
|
|
260
284
|
const TEST_PROGRESS_NAME = `${meta.profile.key}.test-progress`;
|
|
261
285
|
|
|
262
|
-
type ProgressGeneratorProps = ThemedClassName;
|
|
286
|
+
type ProgressGeneratorProps = Util.ThemedClassName;
|
|
263
287
|
|
|
264
288
|
// Drives a synthetic progress monitor (10s over 10 steps) so the R0 rail meter can be exercised —
|
|
265
289
|
// and renders the meter here too, since the rail's only lives inside a popover the user must open,
|
|
266
290
|
// which made a working monitor look like a broken one.
|
|
267
291
|
const ProgressGenerator = ({ classNames }: ProgressGeneratorProps) => {
|
|
268
|
-
const registry = useOptionalCapability(AppCapabilities.ProgressRegistry);
|
|
269
|
-
const monitor = useProgressMonitor(TEST_PROGRESS_NAME);
|
|
292
|
+
const registry = Hooks.useOptionalCapability(AppCapabilities.ProgressRegistry);
|
|
293
|
+
const monitor = ToolkitHooks.useProgressMonitor(TEST_PROGRESS_NAME);
|
|
270
294
|
const running = monitor?.status === 'running';
|
|
271
295
|
const intervalRef = useRef<ReturnType<typeof setInterval> | undefined>(undefined);
|
|
272
296
|
|
|
@@ -317,18 +341,23 @@ const ProgressGenerator = ({ classNames }: ProgressGeneratorProps) => {
|
|
|
317
341
|
|
|
318
342
|
return (
|
|
319
343
|
<div className={mx('flex flex-col gap-1 py-1', classNames)}>
|
|
320
|
-
<Flex gap='sm' align='center'>
|
|
344
|
+
<Layout.Flex gap='sm' align='center'>
|
|
321
345
|
<span className='grow'>Progress Monitor</span>
|
|
322
346
|
{running ? (
|
|
323
|
-
<
|
|
347
|
+
<Button.Root
|
|
324
348
|
icon='ph--x--regular'
|
|
325
349
|
label='Cancel test progress'
|
|
326
350
|
onClick={() => registry?.cancel(TEST_PROGRESS_NAME)}
|
|
327
351
|
/>
|
|
328
352
|
) : (
|
|
329
|
-
<
|
|
353
|
+
<Button.Root
|
|
354
|
+
icon='ph--play--regular'
|
|
355
|
+
label='Start test progress'
|
|
356
|
+
disabled={!registry}
|
|
357
|
+
onClick={handleStart}
|
|
358
|
+
/>
|
|
330
359
|
)}
|
|
331
|
-
</Flex>
|
|
360
|
+
</Layout.Flex>
|
|
332
361
|
{monitor && (monitor.status === 'running' || monitor.status === 'error') && (
|
|
333
362
|
<ProgressMeter state={monitor} onCancel={() => registry?.cancel(TEST_PROGRESS_NAME)} />
|
|
334
363
|
)}
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { useAtomValue } from '@effect/atom-react/Hooks';
|
|
6
|
-
import * as Atom from 'effect/
|
|
7
|
-
import React
|
|
6
|
+
import * as Atom from 'effect/reactivity/Atom';
|
|
7
|
+
import React from 'react';
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import * as Hooks from '@dxos/app-framework/Hooks';
|
|
10
10
|
import * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';
|
|
11
|
-
import {
|
|
11
|
+
import { STAT_CARD_HUES, StatCard } from '@dxos/devtools';
|
|
12
|
+
import * as Layout from '@dxos/react-ui/Layout';
|
|
12
13
|
|
|
13
14
|
// Fallback so the atom hook is called unconditionally when no store is contributed (host plugin not
|
|
14
15
|
// loaded); the panel then renders its empty state.
|
|
@@ -17,12 +18,12 @@ const EMPTY = Atom.make<Record<string, unknown>>({});
|
|
|
17
18
|
const isRecord = (value: unknown): value is Record<string, unknown> =>
|
|
18
19
|
typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
19
20
|
|
|
20
|
-
/** Renders a leaf value; numbers are
|
|
21
|
+
/** Renders a leaf value; numbers are localised so columns of counts read alike. */
|
|
21
22
|
const formatValue = (value: unknown): string => (typeof value === 'number' ? value.toLocaleString() : String(value));
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* Flattens a compartment into `key → value` rows, one level deep: nested objects (e.g. `coverage`)
|
|
25
|
-
* become dotted keys (`coverage.plain`) so everything renders
|
|
26
|
+
* become dotted keys (`coverage.plain`) so everything renders as flat rows.
|
|
26
27
|
*/
|
|
27
28
|
const flatten = (stats: unknown): [string, unknown][] => {
|
|
28
29
|
if (!isRecord(stats)) {
|
|
@@ -36,39 +37,39 @@ const flatten = (stats: unknown): [string, unknown][] => {
|
|
|
36
37
|
);
|
|
37
38
|
};
|
|
38
39
|
|
|
40
|
+
export type StatsPanelProps = {
|
|
41
|
+
/** Renders the empty state as a card too, so a stack shows the store exists. */
|
|
42
|
+
showEmpty?: boolean;
|
|
43
|
+
};
|
|
44
|
+
|
|
39
45
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* displays whatever each plugin stores, so it works for sync telemetry or any other stats.
|
|
46
|
+
* The {@link AppCapabilities.StatsPanel} store as one card per plugin compartment, live (re-renders
|
|
47
|
+
* on each write). Purely generic — it displays whatever each plugin stores.
|
|
43
48
|
*/
|
|
44
|
-
export const StatsPanel = () => {
|
|
45
|
-
const store = useOptionalCapability(AppCapabilities.StatsPanel);
|
|
49
|
+
export const StatsPanel = ({ showEmpty = true }: StatsPanelProps) => {
|
|
50
|
+
const store = Hooks.useOptionalCapability(AppCapabilities.StatsPanel);
|
|
46
51
|
const stats = useAtomValue(store?.statsAtom ?? EMPTY);
|
|
47
52
|
const compartments = Object.entries(stats);
|
|
48
53
|
if (compartments.length === 0) {
|
|
49
|
-
return
|
|
54
|
+
return showEmpty ? (
|
|
55
|
+
<StatCard.Root>
|
|
56
|
+
<StatCard.Header icon='ph--chart-bar--regular' hue={STAT_CARD_HUES.system} title='Plugin stats' />
|
|
57
|
+
<StatCard.Row label='No stats yet.' />
|
|
58
|
+
</StatCard.Root>
|
|
59
|
+
) : null;
|
|
50
60
|
}
|
|
51
61
|
|
|
52
62
|
return (
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{formatValue(cell)}
|
|
64
|
-
</dd>
|
|
65
|
-
</Fragment>
|
|
66
|
-
))}
|
|
67
|
-
</dl>
|
|
68
|
-
</section>
|
|
69
|
-
))}
|
|
70
|
-
</ScrollArea.Viewport>
|
|
71
|
-
</ScrollArea.Root>
|
|
63
|
+
<Layout.Container gap='md' gutter='none'>
|
|
64
|
+
{compartments.map(([pluginKey, value]) => (
|
|
65
|
+
<StatCard.Root key={pluginKey}>
|
|
66
|
+
<StatCard.Header icon='ph--chart-bar--regular' hue={STAT_CARD_HUES.system} title={pluginKey} />
|
|
67
|
+
{flatten(value).map(([key, cell]) => (
|
|
68
|
+
<StatCard.Row key={key} label={key} tooltip={key} value={formatValue(cell)} />
|
|
69
|
+
))}
|
|
70
|
+
</StatCard.Root>
|
|
71
|
+
))}
|
|
72
|
+
</Layout.Container>
|
|
72
73
|
);
|
|
73
74
|
};
|
|
74
75
|
|
|
@@ -6,13 +6,14 @@ import React from 'react';
|
|
|
6
6
|
import { useResizeDetector } from 'react-resize-detector';
|
|
7
7
|
|
|
8
8
|
import { Obj } from '@dxos/echo';
|
|
9
|
-
import { Flex, type ThemedClassName } from '@dxos/react-ui';
|
|
10
9
|
import { useAttentionAttributes } from '@dxos/react-ui-attention';
|
|
11
10
|
import { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
11
|
+
import * as Layout from '@dxos/react-ui/Layout';
|
|
12
|
+
import type * as Util from '@dxos/react-ui/Util';
|
|
12
13
|
import { mx } from '@dxos/ui-theme';
|
|
13
14
|
|
|
14
15
|
// TODO(burdon): Create generic container with wireframe mode.
|
|
15
|
-
export type WireframeProps = ThemedClassName<{
|
|
16
|
+
export type WireframeProps = Util.ThemedClassName<{
|
|
16
17
|
object: Obj.Unknown;
|
|
17
18
|
label?: string;
|
|
18
19
|
}>;
|
|
@@ -24,14 +25,14 @@ export const Wireframe = ({ classNames, label, object }: WireframeProps) => {
|
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
27
|
<div ref={ref} className={mx('relative grow min-h-96', classNames)} {...attentionAttrs}>
|
|
27
|
-
<Flex column gap='sm' classNames='absolute inset-2 overflow-hidden font-mono'>
|
|
28
|
-
<Flex justify='between'>
|
|
28
|
+
<Layout.Flex column gap='sm' classNames='absolute inset-2 overflow-hidden font-mono'>
|
|
29
|
+
<Layout.Flex justify='between'>
|
|
29
30
|
<div>{label}</div>
|
|
30
31
|
<div>{`[${width}x${height}]`}</div>
|
|
31
|
-
</Flex>
|
|
32
|
+
</Layout.Flex>
|
|
32
33
|
{object && <JsonHighlighter data={object} classNames='text-xs opacity-75 rounded-sm' />}
|
|
33
|
-
</Flex>
|
|
34
|
-
<svg width={width} height={height} className='bg-transparent *:text-
|
|
34
|
+
</Layout.Flex>
|
|
35
|
+
<svg width={width} height={height} className='bg-transparent *:text-fg-subtle'>
|
|
35
36
|
<rect x={0} y={0} width={width} height={height} strokeWidth={1} fill='none' />
|
|
36
37
|
<line x1={0} y1={0} x2={width} y2={height} strokeWidth={1} />
|
|
37
38
|
<line x1={0} y1={height} x2={width} y2={0} strokeWidth={1} />
|