@dxos/plugin-debug 0.8.3 → 0.8.4-main.1c7ec43d41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/index.mjs +19 -123
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +81 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/types/src/DebugPlugin.d.ts +4 -1
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/DebugPlugin.node.d.ts +5 -0
- package/dist/types/src/DebugPlugin.node.d.ts.map +1 -0
- package/dist/types/src/DebugPlugin.test.d.ts +2 -0
- package/dist/types/src/DebugPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +8 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context.d.ts +4 -2
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +7 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +5 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/components/DebugSettings/DebugSettings.d.ts +11 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts +99 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/index.d.ts +2 -0
- package/dist/types/src/components/DebugSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/index.d.ts +2 -0
- package/dist/types/src/components/SchemaTable/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +6 -4
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/draw-util.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/index.d.ts +2 -2
- package/dist/types/src/components/SpaceGenerator/index.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts +5 -8
- package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -9
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +8 -0
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -0
- package/dist/types/src/containers/DebugGraph/index.d.ts +2 -0
- package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +6 -0
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts +2 -0
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +5 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +2 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugStatus/DebugStatus.d.ts.map +1 -0
- package/dist/types/src/containers/DebugStatus/index.d.ts +2 -0
- package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/DevtoolsOverviewContainer}/DevtoolsOverviewContainer.d.ts +0 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -0
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +2 -0
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts +11 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/index.d.ts +2 -0
- package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/Wireframe}/Wireframe.d.ts +2 -2
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -0
- package/dist/types/src/containers/Wireframe/index.d.ts +2 -0
- package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +9 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +83 -60
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +8 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +69 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +99 -73
- package/src/DebugPlugin.node.ts +18 -0
- package/src/DebugPlugin.test.ts +29 -0
- package/src/DebugPlugin.tsx +30 -37
- package/src/capabilities/app-graph-builder.ts +361 -413
- package/src/capabilities/index.ts +5 -5
- package/src/capabilities/react-context.tsx +16 -7
- package/src/capabilities/react-surface.tsx +381 -339
- package/src/capabilities/settings.ts +24 -12
- package/src/components/DebugSettings/DebugSettings.stories.tsx +36 -0
- package/src/components/DebugSettings/DebugSettings.tsx +262 -0
- package/src/components/DebugSettings/index.ts +5 -0
- package/src/components/SchemaTable/index.ts +5 -0
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +44 -46
- package/src/components/SpaceGenerator/draw-util.ts +13 -13
- package/src/components/SpaceGenerator/index.ts +2 -3
- package/src/components/SpaceGenerator/presets.ts +527 -263
- package/src/components/index.ts +4 -8
- package/src/containers/DebugGraph/DebugGraph.tsx +14 -0
- package/src/containers/DebugGraph/index.ts +5 -0
- package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +76 -0
- package/src/containers/DebugObjectPanel/index.ts +5 -0
- package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +47 -0
- package/src/containers/DebugSpaceObjectsPanel/index.ts +5 -0
- package/src/{components → containers/DebugStatus}/DebugStatus.tsx +43 -21
- package/src/containers/DebugStatus/index.ts +5 -0
- package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +25 -0
- package/src/containers/DevtoolsOverviewContainer/index.ts +5 -0
- package/src/containers/SpaceGenerator/SpaceGenerator.tsx +126 -0
- package/src/containers/SpaceGenerator/index.ts +5 -0
- package/src/{components → containers/Wireframe}/Wireframe.tsx +8 -12
- package/src/containers/Wireframe/index.ts +5 -0
- package/src/containers/index.ts +13 -0
- package/src/index.ts +7 -1
- package/src/meta.ts +8 -7
- package/src/translations.ts +80 -59
- package/src/types/Settings.ts +16 -0
- package/src/{types.ts → types/index.ts} +20 -11
- package/dist/lib/browser/DebugApp-WSEJPCKY.mjs +0 -225
- package/dist/lib/browser/DebugApp-WSEJPCKY.mjs.map +0 -7
- package/dist/lib/browser/DevtoolsOverviewContainer-IIIWO77Q.mjs +0 -25
- package/dist/lib/browser/DevtoolsOverviewContainer-IIIWO77Q.mjs.map +0 -7
- package/dist/lib/browser/SpaceGenerator-VB6IB2LL.mjs +0 -1238
- package/dist/lib/browser/SpaceGenerator-VB6IB2LL.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-6HHJMKVU.mjs +0 -597
- package/dist/lib/browser/app-graph-builder-6HHJMKVU.mjs.map +0 -7
- package/dist/lib/browser/chunk-47JOZTT2.mjs +0 -18
- package/dist/lib/browser/chunk-47JOZTT2.mjs.map +0 -7
- package/dist/lib/browser/chunk-KS3YBEL7.mjs +0 -68
- package/dist/lib/browser/chunk-KS3YBEL7.mjs.map +0 -7
- package/dist/lib/browser/react-context-ZQRD2WG2.mjs +0 -16
- package/dist/lib/browser/react-context-ZQRD2WG2.mjs.map +0 -7
- package/dist/lib/browser/react-surface-UI6OK73H.mjs +0 -768
- package/dist/lib/browser/react-surface-UI6OK73H.mjs.map +0 -7
- package/dist/lib/browser/settings-SXQWSIM4.mjs +0 -22
- package/dist/lib/browser/settings-SXQWSIM4.mjs.map +0 -7
- package/dist/types/src/components/Container.d.ts +0 -5
- package/dist/types/src/components/Container.d.ts.map +0 -1
- package/dist/types/src/components/DebugApp/DebugApp.d.ts +0 -6
- package/dist/types/src/components/DebugApp/DebugApp.d.ts.map +0 -1
- package/dist/types/src/components/DebugApp/Tree.d.ts +0 -18
- package/dist/types/src/components/DebugApp/Tree.d.ts.map +0 -1
- package/dist/types/src/components/DebugApp/index.d.ts +0 -3
- package/dist/types/src/components/DebugApp/index.d.ts.map +0 -1
- package/dist/types/src/components/DebugObjectPanel.d.ts +0 -7
- package/dist/types/src/components/DebugObjectPanel.d.ts.map +0 -1
- package/dist/types/src/components/DebugSettings.d.ts +0 -6
- package/dist/types/src/components/DebugSettings.d.ts.map +0 -1
- package/dist/types/src/components/DebugStatus.d.ts.map +0 -1
- package/dist/types/src/components/DevtoolsOverviewContainer.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +0 -9
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts +0 -6
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts.map +0 -1
- package/dist/types/src/components/Wireframe.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -63
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/components/Container.tsx +0 -15
- package/src/components/DebugApp/DebugApp.tsx +0 -77
- package/src/components/DebugApp/Tree.tsx +0 -103
- package/src/components/DebugApp/index.ts +0 -7
- package/src/components/DebugObjectPanel.tsx +0 -35
- package/src/components/DebugSettings.tsx +0 -151
- package/src/components/DevtoolsOverviewContainer.tsx +0 -20
- package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +0 -52
- package/src/components/SpaceGenerator/SpaceGenerator.tsx +0 -179
- /package/dist/types/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.d.ts +0 -0
- /package/dist/types/src/{components → containers/DebugStatus}/DebugStatus.d.ts +0 -0
- /package/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.tsx +0 -0
package/src/translations.ts
CHANGED
|
@@ -2,69 +2,90 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type Resource } from '@dxos/react-ui';
|
|
6
|
+
import { translations as introspectTranslations } from '@dxos/react-ui-introspect/translations';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
import { meta } from '#meta';
|
|
9
|
+
|
|
10
|
+
export const translations = [
|
|
11
|
+
...introspectTranslations,
|
|
8
12
|
{
|
|
9
13
|
'en-US': {
|
|
10
|
-
[
|
|
11
|
-
'plugin
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'devtools
|
|
16
|
-
'
|
|
17
|
-
'debug
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
|
|
22
|
-
'settings
|
|
23
|
-
'settings
|
|
24
|
-
'settings
|
|
25
|
-
'settings
|
|
26
|
-
|
|
27
|
-
'settings
|
|
28
|
-
'settings
|
|
29
|
-
'settings
|
|
30
|
-
'settings
|
|
31
|
-
'settings
|
|
14
|
+
[meta.id]: {
|
|
15
|
+
'plugin.name': 'Debug',
|
|
16
|
+
'settings.title': 'Debug settings',
|
|
17
|
+
'open-devtools.label': 'Open DevTools',
|
|
18
|
+
'devtools.label': 'DevTools',
|
|
19
|
+
'devtools-overview.label': 'Stats',
|
|
20
|
+
'space-objects.label': 'Database',
|
|
21
|
+
'debug.label': 'Debug',
|
|
22
|
+
'generate-objects.label': 'Generate Objects',
|
|
23
|
+
'debug-app-graph.label': 'App Graph',
|
|
24
|
+
'debug-tools-explorer.label': 'Tools Explorer',
|
|
25
|
+
|
|
26
|
+
'settings.wireframe.label': 'Show wireframes.',
|
|
27
|
+
'settings.wireframe.description': 'Overlay wireframe outlines on UI components for debugging layout.',
|
|
28
|
+
'settings.trace-all.label': 'Trace all requests (100% sampling).',
|
|
29
|
+
'settings.trace-all.description':
|
|
30
|
+
'Override the default 30% sampling rate to capture all traces. Requires page reload to take effect.',
|
|
31
|
+
'settings.tracing-panel.label': 'Open tracing panel.',
|
|
32
|
+
'settings.tracing-panel.description': 'Open the tracing dashboard to inspect captured spans.',
|
|
33
|
+
'settings.repair.label': 'Run repair tool.',
|
|
34
|
+
'settings.repair.description': 'Attempt to detect and fix inconsistencies in local data storage.',
|
|
35
|
+
'settings.download-diagnostics.label': 'Download diagnostics.',
|
|
36
|
+
'settings.download-diagnostics.description':
|
|
37
|
+
'Export a JSON file containing client diagnostics for troubleshooting.',
|
|
38
|
+
'settings.download-logs.label': 'Download log buffer.',
|
|
39
|
+
'settings.download-logs.description': 'Export the in-memory log buffer as an NDJSON file.',
|
|
40
|
+
'settings.uploaded.message': 'Settings uploaded.',
|
|
41
|
+
'settings.uploaded.description': 'URL copied to clipboard.',
|
|
42
|
+
'settings.choose-storage-adaptor.label': 'Storage adaptor (worker reload required).',
|
|
43
|
+
'settings.choose-storage-adaptor.description':
|
|
44
|
+
'Select the browser storage backend. Changing this requires a worker reload and may make existing data unavailable.',
|
|
45
|
+
'settings.repair-success.message': 'Repair succeeded',
|
|
46
|
+
'settings.repair-failed.message': 'Repair failed',
|
|
47
|
+
|
|
48
|
+
'settings.storage-adaptor.idb.label': 'IndexedDB',
|
|
49
|
+
'settings.storage-adaptor.opfs.label': 'OPFS',
|
|
50
|
+
'settings.storage-adapter.changed-alert.message':
|
|
32
51
|
'Warning: Swapping the storage adapter will make your data unavailable.',
|
|
33
|
-
|
|
34
|
-
'
|
|
35
|
-
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'
|
|
62
|
-
'
|
|
63
|
-
'
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
52
|
+
|
|
53
|
+
'settings.data-store.label': 'Data Store',
|
|
54
|
+
|
|
55
|
+
'open-debug-panel.label': 'Show Debug',
|
|
56
|
+
'client.label': 'Client',
|
|
57
|
+
'config.label': 'Config',
|
|
58
|
+
'storage.label': 'Storage',
|
|
59
|
+
'logs.label': 'Logs',
|
|
60
|
+
'diagnostics.label': 'Diagnostics',
|
|
61
|
+
'tracing.label': 'Tracing',
|
|
62
|
+
'halo.label': 'HALO',
|
|
63
|
+
'identity.label': 'Identity',
|
|
64
|
+
'devices.label': 'Devices',
|
|
65
|
+
'keyring.label': 'Keyring',
|
|
66
|
+
'credentials.label': 'Credentials',
|
|
67
|
+
'echo.label': 'ECHO',
|
|
68
|
+
'spaces.label': 'Spaces',
|
|
69
|
+
'space.label': 'Space',
|
|
70
|
+
'feeds.label': 'Feeds',
|
|
71
|
+
'objects.label': 'Objects',
|
|
72
|
+
'schema.label': 'Schema',
|
|
73
|
+
'automerge.label': 'Automerge',
|
|
74
|
+
'queues.label': 'Queues',
|
|
75
|
+
'members.label': 'Members',
|
|
76
|
+
'metadata.label': 'Metadata',
|
|
77
|
+
'mesh.label': 'MESH',
|
|
78
|
+
'signal.label': 'Signal',
|
|
79
|
+
'swarm.label': 'Swarm',
|
|
80
|
+
'network.label': 'Network',
|
|
81
|
+
'agent.label': 'Agent',
|
|
82
|
+
'dashboard.label': 'Dashboard',
|
|
83
|
+
'search.label': 'Search',
|
|
84
|
+
'edge.label': 'EDGE',
|
|
85
|
+
'workflows.label': 'Workflows',
|
|
86
|
+
'traces.label': 'Traces',
|
|
87
|
+
'testing.label': 'Testing',
|
|
67
88
|
},
|
|
68
89
|
},
|
|
69
90
|
},
|
|
70
|
-
];
|
|
91
|
+
] as const satisfies Resource[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
export const Settings = Schema.mutable(
|
|
10
|
+
Schema.Struct({
|
|
11
|
+
wireframe: Schema.optional(Schema.Boolean),
|
|
12
|
+
traceAll: Schema.optional(Schema.Boolean),
|
|
13
|
+
}),
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export interface Settings extends Schema.Schema.Type<typeof Settings> {}
|
|
@@ -2,10 +2,23 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
6
6
|
import { type Context, createContext } from 'react';
|
|
7
7
|
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
9
|
import type { TimerCallback, TimerOptions } from '@dxos/async';
|
|
10
|
+
import { type IdbLogStore } from '@dxos/log-store-idb';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
|
|
14
|
+
import * as Settings from './Settings';
|
|
15
|
+
|
|
16
|
+
export * as Settings from './Settings';
|
|
17
|
+
|
|
18
|
+
export type DebugPluginOptions = {
|
|
19
|
+
/** Shared persistent log store for capturing and downloading logs. */
|
|
20
|
+
logStore?: IdbLogStore;
|
|
21
|
+
};
|
|
9
22
|
|
|
10
23
|
export type DebugContextType = {
|
|
11
24
|
running: boolean;
|
|
@@ -19,17 +32,14 @@ export const DebugContext: Context<DebugContextType> = createContext<DebugContex
|
|
|
19
32
|
stop: () => {},
|
|
20
33
|
});
|
|
21
34
|
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}),
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
export interface DebugSettingsProps extends Schema.Schema.Type<typeof DebugSettingsSchema> {}
|
|
35
|
+
export namespace DebugCapabilities {
|
|
36
|
+
export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.id}.capability.settings`);
|
|
37
|
+
}
|
|
29
38
|
|
|
30
39
|
export namespace Devtools {
|
|
31
|
-
|
|
32
|
-
|
|
40
|
+
export const id = `${meta.id}.devtools`;
|
|
41
|
+
|
|
42
|
+
export const ToolsExplorer = `${Devtools.id}.tools-explorer`;
|
|
33
43
|
|
|
34
44
|
export namespace Client {
|
|
35
45
|
export const id = `${Devtools.id}.client`;
|
|
@@ -37,7 +47,6 @@ export namespace Devtools {
|
|
|
37
47
|
export const Storage = `${Devtools.Client.id}.storage`;
|
|
38
48
|
export const Logs = `${Devtools.Client.id}.logs`;
|
|
39
49
|
export const Diagnostics = `${Devtools.Client.id}.diagnostics`;
|
|
40
|
-
export const Tracing = `${Devtools.Client.id}.tracing`;
|
|
41
50
|
}
|
|
42
51
|
|
|
43
52
|
export namespace Halo {
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
// packages/plugins/plugin-debug/src/components/DebugApp/DebugApp.tsx
|
|
2
|
-
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
3
|
-
import { Gauge, Graph as GraphIcon, Gear, Toolbox, Warning } from "@phosphor-icons/react";
|
|
4
|
-
import React3, { useEffect, useState as useState2 } from "react";
|
|
5
|
-
import { useClient, useConfig } from "@dxos/react-client";
|
|
6
|
-
import { Button, ToggleGroup, ToggleGroupItem, Toolbar } from "@dxos/react-ui";
|
|
7
|
-
import { getSize, mx as mx2 } from "@dxos/react-ui-theme";
|
|
8
|
-
|
|
9
|
-
// packages/plugins/plugin-debug/src/components/DebugApp/Tree.tsx
|
|
10
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
11
|
-
import React, { useState } from "react";
|
|
12
|
-
import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
|
|
13
|
-
import { mx } from "@dxos/react-ui-theme";
|
|
14
|
-
import { arrayToBuffer } from "@dxos/util";
|
|
15
|
-
var replacer = (key, value) => {
|
|
16
|
-
if (typeof value === "object") {
|
|
17
|
-
if (value instanceof Uint8Array) {
|
|
18
|
-
return arrayToBuffer(value).toString("hex");
|
|
19
|
-
}
|
|
20
|
-
if (value?.type === "Buffer") {
|
|
21
|
-
return Buffer.from(value.data).toString("hex");
|
|
22
|
-
}
|
|
23
|
-
if (key === "downloaded") {
|
|
24
|
-
return void 0;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return value;
|
|
28
|
-
};
|
|
29
|
-
var Json = ({ data }) => {
|
|
30
|
-
var _effect = _useSignals();
|
|
31
|
-
try {
|
|
32
|
-
return /* @__PURE__ */ React.createElement(SyntaxHighlighter, {
|
|
33
|
-
language: "json"
|
|
34
|
-
}, JSON.stringify(data, replacer, 2));
|
|
35
|
-
} finally {
|
|
36
|
-
_effect.f();
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
var Tree = ({ data }) => {
|
|
40
|
-
var _effect = _useSignals();
|
|
41
|
-
try {
|
|
42
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
43
|
-
className: "p-2"
|
|
44
|
-
}, /* @__PURE__ */ React.createElement(Node, {
|
|
45
|
-
data,
|
|
46
|
-
root: true
|
|
47
|
-
}));
|
|
48
|
-
} finally {
|
|
49
|
-
_effect.f();
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
var Node = ({ data, root }) => {
|
|
53
|
-
var _effect = _useSignals();
|
|
54
|
-
try {
|
|
55
|
-
if (typeof data !== "object" || data === void 0 || data === null) {
|
|
56
|
-
return /* @__PURE__ */ React.createElement(Scalar, {
|
|
57
|
-
value: data
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
if (Array.isArray(data)) {
|
|
61
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
62
|
-
className: "flex flex-col space-y-2"
|
|
63
|
-
}, data.map((value, index) => /* @__PURE__ */ React.createElement(KeyValue, {
|
|
64
|
-
key: index,
|
|
65
|
-
label: String(index),
|
|
66
|
-
data: value,
|
|
67
|
-
className: "bg-teal-50"
|
|
68
|
-
})));
|
|
69
|
-
}
|
|
70
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
71
|
-
className: "flex flex-col space-y-2"
|
|
72
|
-
}, Object.entries(data).map(([key, value]) => /* @__PURE__ */ React.createElement(KeyValue, {
|
|
73
|
-
key,
|
|
74
|
-
label: key,
|
|
75
|
-
data: value,
|
|
76
|
-
className: "bg-blue-50"
|
|
77
|
-
})));
|
|
78
|
-
} finally {
|
|
79
|
-
_effect.f();
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
var KeyValue = ({ label, data, className }) => {
|
|
83
|
-
var _effect = _useSignals();
|
|
84
|
-
try {
|
|
85
|
-
const [open, setOpen] = useState(true);
|
|
86
|
-
if (data === void 0) {
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
90
|
-
className: "flex"
|
|
91
|
-
}, /* @__PURE__ */ React.createElement(Box, {
|
|
92
|
-
className: mx("border-blue-200 text-sm select-none cursor-pointer", className),
|
|
93
|
-
onClick: () => setOpen((open2) => !open2)
|
|
94
|
-
}, label), open && /* @__PURE__ */ React.createElement(Node, {
|
|
95
|
-
data
|
|
96
|
-
}));
|
|
97
|
-
} finally {
|
|
98
|
-
_effect.f();
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
var Scalar = ({ value }) => {
|
|
102
|
-
var _effect = _useSignals();
|
|
103
|
-
try {
|
|
104
|
-
return /* @__PURE__ */ React.createElement(Box, {
|
|
105
|
-
className: "bg-green-50 border-green-200 rounded-r text-sm font-thin"
|
|
106
|
-
}, value === void 0 && "undefined" || value === null && "null" || typeof value === "string" && value || JSON.stringify(value));
|
|
107
|
-
} finally {
|
|
108
|
-
_effect.f();
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
var Box = ({ children, className, ...props }) => {
|
|
112
|
-
var _effect = _useSignals();
|
|
113
|
-
try {
|
|
114
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
115
|
-
className: mx("flex px-2 border border-l-0 font-mono truncate", className),
|
|
116
|
-
...props
|
|
117
|
-
}, children);
|
|
118
|
-
} finally {
|
|
119
|
-
_effect.f();
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
// packages/plugins/plugin-debug/src/components/Container.tsx
|
|
124
|
-
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
125
|
-
import React2 from "react";
|
|
126
|
-
var Container = ({ toolbar, children }) => {
|
|
127
|
-
var _effect = _useSignals2();
|
|
128
|
-
try {
|
|
129
|
-
return /* @__PURE__ */ React2.createElement("div", {
|
|
130
|
-
role: "none",
|
|
131
|
-
className: "flex flex-col grow overflow-hidden divide-y divide-separator"
|
|
132
|
-
}, toolbar, /* @__PURE__ */ React2.createElement("div", {
|
|
133
|
-
className: "flex flex-col grow overflow-auto"
|
|
134
|
-
}, children));
|
|
135
|
-
} finally {
|
|
136
|
-
_effect.f();
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
// packages/plugins/plugin-debug/src/components/DebugApp/DebugApp.tsx
|
|
141
|
-
var DebugApp = ({ graph }) => {
|
|
142
|
-
var _effect = _useSignals3();
|
|
143
|
-
try {
|
|
144
|
-
const [view, setView] = useState2("graph");
|
|
145
|
-
const [data, setData] = useState2({});
|
|
146
|
-
const client = useClient();
|
|
147
|
-
const config = useConfig();
|
|
148
|
-
const handleRefresh = async () => {
|
|
149
|
-
const data2 = await client.diagnostics({
|
|
150
|
-
truncate: true
|
|
151
|
-
});
|
|
152
|
-
setData(data2);
|
|
153
|
-
};
|
|
154
|
-
useEffect(() => {
|
|
155
|
-
void handleRefresh();
|
|
156
|
-
}, []);
|
|
157
|
-
const handleResetClient = async (force = false) => {
|
|
158
|
-
if (!force && !window.confirm("Reset storage?")) {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
await client.reset();
|
|
162
|
-
window.location.href = window.location.origin;
|
|
163
|
-
};
|
|
164
|
-
const handleOpenDevtools = () => {
|
|
165
|
-
const vaultUrl = config.values?.runtime?.client?.remoteSource;
|
|
166
|
-
if (vaultUrl) {
|
|
167
|
-
window.open(`https://devtools.dev.dxos.org/?target=${vaultUrl}`);
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
return /* @__PURE__ */ React3.createElement(Container, {
|
|
171
|
-
toolbar: /* @__PURE__ */ React3.createElement(Toolbar.Root, {
|
|
172
|
-
classNames: "p-1"
|
|
173
|
-
}, /* @__PURE__ */ React3.createElement(ToggleGroup, {
|
|
174
|
-
type: "single",
|
|
175
|
-
value: view
|
|
176
|
-
}, /* @__PURE__ */ React3.createElement(ToggleGroupItem, {
|
|
177
|
-
value: "graph",
|
|
178
|
-
onClick: () => setView("graph"),
|
|
179
|
-
title: "Plugin graph"
|
|
180
|
-
}, /* @__PURE__ */ React3.createElement(GraphIcon, {
|
|
181
|
-
className: getSize(5)
|
|
182
|
-
})), /* @__PURE__ */ React3.createElement(ToggleGroupItem, {
|
|
183
|
-
value: "diagnostics",
|
|
184
|
-
onClick: () => setView("diagnostics"),
|
|
185
|
-
title: "Diagnostics"
|
|
186
|
-
}, /* @__PURE__ */ React3.createElement(Gauge, {
|
|
187
|
-
className: getSize(5)
|
|
188
|
-
})), /* @__PURE__ */ React3.createElement(ToggleGroupItem, {
|
|
189
|
-
value: "config",
|
|
190
|
-
onClick: () => setView("config"),
|
|
191
|
-
title: "Config"
|
|
192
|
-
}, /* @__PURE__ */ React3.createElement(Gear, {
|
|
193
|
-
className: getSize(5)
|
|
194
|
-
}))), /* @__PURE__ */ React3.createElement(Toolbar.Separator, {
|
|
195
|
-
variant: "gap"
|
|
196
|
-
}), /* @__PURE__ */ React3.createElement(Button, {
|
|
197
|
-
onClick: (event) => handleResetClient(event.shiftKey),
|
|
198
|
-
title: "Reset client"
|
|
199
|
-
}, /* @__PURE__ */ React3.createElement(Warning, {
|
|
200
|
-
className: mx2(getSize(5), "text-red-700")
|
|
201
|
-
})), /* @__PURE__ */ React3.createElement(Button, {
|
|
202
|
-
onClick: handleOpenDevtools,
|
|
203
|
-
title: "Open Devtools"
|
|
204
|
-
}, /* @__PURE__ */ React3.createElement(Toolbox, {
|
|
205
|
-
weight: "duotone",
|
|
206
|
-
className: mx2(getSize(5), "text-700")
|
|
207
|
-
})))
|
|
208
|
-
}, view === "graph" && /* @__PURE__ */ React3.createElement(Tree, {
|
|
209
|
-
data: graph.toJSON()
|
|
210
|
-
}), view === "config" && /* @__PURE__ */ React3.createElement(Json, {
|
|
211
|
-
data: data.diagnostics?.config
|
|
212
|
-
}), view === "diagnostics" && /* @__PURE__ */ React3.createElement(Json, {
|
|
213
|
-
data
|
|
214
|
-
}));
|
|
215
|
-
} finally {
|
|
216
|
-
_effect.f();
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
// packages/plugins/plugin-debug/src/components/DebugApp/index.ts
|
|
221
|
-
var DebugApp_default = DebugApp;
|
|
222
|
-
export {
|
|
223
|
-
DebugApp_default as default
|
|
224
|
-
};
|
|
225
|
-
//# sourceMappingURL=DebugApp-WSEJPCKY.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/DebugApp/DebugApp.tsx", "../../../src/components/DebugApp/Tree.tsx", "../../../src/components/Container.tsx", "../../../src/components/DebugApp/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Gauge, Graph as GraphIcon, Gear, Toolbox, Warning } from '@phosphor-icons/react';\nimport React, { type FC, useEffect, useState } from 'react';\n\nimport { type Graph } from '@dxos/plugin-graph';\nimport { useClient, useConfig } from '@dxos/react-client';\nimport { Button, ToggleGroup, ToggleGroupItem, Toolbar } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { Json, Tree } from './Tree';\nimport { Container } from '../Container';\n\nexport const DebugApp: FC<{ graph: Graph }> = ({ graph }) => {\n const [view, setView] = useState<'config' | 'diagnostics' | 'graph'>('graph');\n const [data, setData] = useState<any>({});\n const client = useClient();\n const config = useConfig();\n const handleRefresh = async () => {\n const data = await client.diagnostics({ truncate: true });\n setData(data);\n };\n useEffect(() => {\n void handleRefresh();\n }, []);\n\n const handleResetClient = async (force = false) => {\n if (!force && !window.confirm('Reset storage?')) {\n return;\n }\n\n // TODO(burdon): Throws exception.\n await client.reset();\n window.location.href = window.location.origin;\n };\n\n const handleOpenDevtools = () => {\n const vaultUrl = config.values?.runtime?.client?.remoteSource;\n if (vaultUrl) {\n window.open(`https://devtools.dev.dxos.org/?target=${vaultUrl}`);\n }\n };\n\n return (\n <Container\n toolbar={\n <Toolbar.Root classNames='p-1'>\n <ToggleGroup type='single' value={view}>\n <ToggleGroupItem value={'graph'} onClick={() => setView('graph')} title={'Plugin graph'}>\n <GraphIcon className={getSize(5)} />\n </ToggleGroupItem>\n <ToggleGroupItem value={'diagnostics'} onClick={() => setView('diagnostics')} title={'Diagnostics'}>\n <Gauge className={getSize(5)} />\n </ToggleGroupItem>\n <ToggleGroupItem value={'config'} onClick={() => setView('config')} title={'Config'}>\n <Gear className={getSize(5)} />\n </ToggleGroupItem>\n </ToggleGroup>\n\n <Toolbar.Separator variant='gap' />\n <Button onClick={(event) => handleResetClient(event.shiftKey)} title='Reset client'>\n <Warning className={mx(getSize(5), 'text-red-700')} />\n </Button>\n <Button onClick={handleOpenDevtools} title='Open Devtools'>\n <Toolbox weight='duotone' className={mx(getSize(5), 'text-700')} />\n </Button>\n </Toolbar.Root>\n }\n >\n {view === 'graph' && <Tree data={graph.toJSON()} />}\n {view === 'config' && <Json data={data.diagnostics?.config} />}\n {view === 'diagnostics' && <Json data={data} />}\n </Container>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type FC, type HTMLAttributes, useState } from 'react';\n\nimport { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/react-ui-theme';\nimport { arrayToBuffer } from '@dxos/util';\n\n// TODO(burdon): Copied form devtools.\n\nexport const replacer = (key: any, value: any) => {\n if (typeof value === 'object') {\n if (value instanceof Uint8Array) {\n return arrayToBuffer(value).toString('hex');\n }\n\n if (value?.type === 'Buffer') {\n return Buffer.from(value.data).toString('hex');\n }\n\n if (key === 'downloaded') {\n return undefined;\n }\n }\n\n return value;\n};\n\nexport const Json: FC<{ data?: object }> = ({ data }) => {\n return <SyntaxHighlighter language='json'>{JSON.stringify(data, replacer, 2)}</SyntaxHighlighter>;\n};\n\nexport const Tree: FC<{ data?: object }> = ({ data }) => {\n return (\n <div className='p-2'>\n <Node data={data} root />\n </div>\n );\n};\n\nexport const Node: FC<{ data?: any; root?: boolean }> = ({ data, root }) => {\n if (typeof data !== 'object' || data === undefined || data === null) {\n return <Scalar value={data} />;\n }\n\n if (Array.isArray(data)) {\n return (\n <div className='flex flex-col space-y-2'>\n {data.map((value, index) => (\n <KeyValue key={index} label={String(index)} data={value} className='bg-teal-50' />\n ))}\n </div>\n );\n }\n\n return (\n <div className='flex flex-col space-y-2'>\n {Object.entries(data).map(([key, value]) => (\n <KeyValue key={key} label={key} data={value} className='bg-blue-50' />\n ))}\n </div>\n );\n};\n\nexport const KeyValue: FC<{ label: string; data?: any; className?: string }> = ({ label, data, className }) => {\n const [open, setOpen] = useState(true);\n if (data === undefined) {\n return null;\n }\n\n return (\n <div className='flex'>\n <Box\n className={mx('border-blue-200 text-sm select-none cursor-pointer', className)}\n onClick={() => setOpen((open) => !open)}\n >\n {label}\n </Box>\n {open && <Node data={data} />}\n </div>\n );\n};\n\nconst Scalar: FC<{ value: any }> = ({ value }) => {\n return (\n <Box className='bg-green-50 border-green-200 rounded-r text-sm font-thin'>\n {(value === undefined && 'undefined') ||\n (value === null && 'null') ||\n (typeof value === 'string' && value) ||\n JSON.stringify(value)}\n </Box>\n );\n};\n\nconst Box: FC<HTMLAttributes<HTMLDivElement>> = ({ children, className, ...props }) => {\n return (\n <div className={mx('flex px-2 border border-l-0 font-mono truncate', className)} {...props}>\n {children}\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type PropsWithChildren, type ReactNode } from 'react';\n\n// TODO(burdon): Convert to grid.\nexport const Container = ({ toolbar, children }: PropsWithChildren<{ toolbar: ReactNode }>) => {\n return (\n <div role='none' className='flex flex-col grow overflow-hidden divide-y divide-separator'>\n {toolbar}\n <div className='flex flex-col grow overflow-auto'>{children}</div>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { DebugApp } from './DebugApp';\n\nexport default DebugApp;\n"],
|
|
5
|
-
"mappings": ";;AAIA,SAASA,OAAOC,SAASC,WAAWC,MAAMC,SAASC,eAAe;AAClE,OAAOC,UAAkBC,WAAWC,YAAAA,iBAAgB;AAGpD,SAASC,WAAWC,iBAAiB;AACrC,SAASC,QAAQC,aAAaC,iBAAiBC,eAAe;AAC9D,SAASC,SAASC,MAAAA,WAAU;;;;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ACgB,MAAAA;QAAKH,WAAWC,QAAQ,CAAA;YAI7B,gBAAAd,OAAA,cAACG,QAAQc,WAAS;QAACC,SAAQ;UAC3B,gBAAAlB,OAAA,cAACmB,QAAAA;QAAOT,SAAS,CAACU,UAAUlC,kBAAkBkC,MAAMC,QAAQ;QAAGV,OAAM;SACnE,gBAAAX,OAAA,cAACsB,SAAAA;QAAQT,WAAWU,IAAGT,QAAQ,CAAA,GAAI,cAAA;WAErC,gBAAAd,OAAA,cAACmB,QAAAA;QAAOT,SAAShB;QAAoBiB,OAAM;SACzC,gBAAAX,OAAA,cAACwB,SAAAA;QAAQC,QAAO;QAAUZ,WAAWU,IAAGT,QAAQ,CAAA,GAAI,UAAA;;OAKzDzC,SAAS,WAAW,gBAAA2B,OAAA,cAAC0B,MAAAA;MAAKlD,MAAMJ,MAAMuD,OAAM;QAC5CtD,SAAS,YAAY,gBAAA2B,OAAA,cAAC4B,MAAAA;MAAKpD,MAAMA,KAAKO,aAAaH;QACnDP,SAAS,iBAAiB,gBAAA2B,OAAA,cAAC4B,MAAAA;MAAKpD;;;;;AAGvC;;;AGtEA,IAAA,mBAAeqD;",
|
|
6
|
-
"names": ["Gauge", "Graph", "GraphIcon", "Gear", "Toolbox", "Warning", "React", "useEffect", "useState", "useClient", "useConfig", "Button", "ToggleGroup", "ToggleGroupItem", "Toolbar", "getSize", "mx", "React", "useState", "SyntaxHighlighter", "mx", "arrayToBuffer", "replacer", "key", "value", "Uint8Array", "arrayToBuffer", "toString", "type", "Buffer", "from", "data", "undefined", "Json", "SyntaxHighlighter", "language", "JSON", "stringify", "Tree", "div", "className", "Node", "root", "Scalar", "Array", "isArray", "map", "index", "KeyValue", "label", "String", "Object", "entries", "open", "setOpen", "useState", "Box", "mx", "onClick", "children", "props", "React", "Container", "toolbar", "children", "React", "div", "role", "className", "DebugApp", "graph", "view", "setView", "useState", "data", "setData", "client", "useClient", "config", "useConfig", "handleRefresh", "diagnostics", "truncate", "useEffect", "handleResetClient", "force", "window", "confirm", "reset", "location", "href", "origin", "handleOpenDevtools", "vaultUrl", "values", "runtime", "remoteSource", "open", "React", "Container", "toolbar", "Toolbar", "Root", "classNames", "ToggleGroup", "type", "value", "ToggleGroupItem", "onClick", "title", "GraphIcon", "className", "getSize", "Gauge", "Gear", "Separator", "variant", "Button", "event", "shiftKey", "Warning", "mx", "Toolbox", "weight", "Tree", "toJSON", "Json", "DebugApp"]
|
|
7
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// packages/plugins/plugin-debug/src/components/DevtoolsOverviewContainer.tsx
|
|
2
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Surface } from "@dxos/app-framework";
|
|
5
|
-
import { StatsPanel, useStats } from "@dxos/devtools";
|
|
6
|
-
var DevtoolsOverviewContainer = () => {
|
|
7
|
-
var _effect = _useSignals();
|
|
8
|
-
try {
|
|
9
|
-
const [stats, refreshStats] = useStats();
|
|
10
|
-
return /* @__PURE__ */ React.createElement(StatsPanel, {
|
|
11
|
-
stats,
|
|
12
|
-
onRefresh: refreshStats
|
|
13
|
-
}, /* @__PURE__ */ React.createElement(Surface, {
|
|
14
|
-
role: "devtools-overview"
|
|
15
|
-
}));
|
|
16
|
-
} finally {
|
|
17
|
-
_effect.f();
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
var DevtoolsOverviewContainer_default = DevtoolsOverviewContainer;
|
|
21
|
-
export {
|
|
22
|
-
DevtoolsOverviewContainer,
|
|
23
|
-
DevtoolsOverviewContainer_default as default
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=DevtoolsOverviewContainer-IIIWO77Q.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/DevtoolsOverviewContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { StatsPanel, useStats } from '@dxos/devtools';\n\nexport const DevtoolsOverviewContainer = () => {\n const [stats, refreshStats] = useStats();\n\n return (\n <StatsPanel stats={stats} onRefresh={refreshStats}>\n <Surface role='devtools-overview' />\n </StatsPanel>\n );\n};\n\nexport default DevtoolsOverviewContainer;\n"],
|
|
5
|
-
"mappings": ";;AAIA,OAAOA,WAAW;AAElB,SAASC,eAAe;AACxB,SAASC,YAAYC,gBAAgB;AAE9B,IAAMC,4BAA4B,MAAA;;;AACvC,UAAM,CAACC,OAAOC,YAAAA,IAAgBC,SAAAA;AAE9B,WACE,sBAAA,cAACC,YAAAA;MAAWH;MAAcI,WAAWH;OACnC,sBAAA,cAACI,SAAAA;MAAQC,MAAK;;;;;AAGpB;AAEA,IAAA,oCAAeP;",
|
|
6
|
-
"names": ["React", "Surface", "StatsPanel", "useStats", "DevtoolsOverviewContainer", "stats", "refreshStats", "useStats", "StatsPanel", "onRefresh", "Surface", "role"]
|
|
7
|
-
}
|