@dxos/plugin-debug 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731
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/LICENSE +102 -5
- package/PLUGIN.mdl +373 -0
- package/README.md +1 -1
- package/dist/lib/{browser/DebugGraph-7HXJ2PS2.mjs → neutral/DebugGraph-G4FWS57E.mjs} +4 -5
- package/dist/lib/neutral/DebugGraph-G4FWS57E.mjs.map +7 -0
- package/dist/lib/neutral/DebugObjectPanel-OS65NC4M.mjs +59 -0
- package/dist/lib/neutral/DebugObjectPanel-OS65NC4M.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.mjs +59 -0
- package/dist/lib/neutral/DebugPlugin.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.node.mjs +18 -0
- package/dist/lib/neutral/DebugPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.workerd.mjs +12 -0
- package/dist/lib/neutral/DebugPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/DebugSettings-RKYNQIKH.mjs +223 -0
- package/dist/lib/neutral/DebugSettings-RKYNQIKH.mjs.map +7 -0
- package/dist/lib/{browser/DebugSpaceObjectsPanel-7NRPLWZ4.mjs → neutral/DebugSpaceObjectsPanel-BHOCFWDJ.mjs} +10 -26
- package/dist/lib/neutral/DebugSpaceObjectsPanel-BHOCFWDJ.mjs.map +7 -0
- package/dist/lib/{browser/DebugStatus-COQGH37G.mjs → neutral/DebugStatus-H2BAHN26.mjs} +36 -39
- package/dist/lib/neutral/DebugStatus-H2BAHN26.mjs.map +7 -0
- package/dist/lib/{browser/DevtoolsOverviewContainer-C75NFVER.mjs → neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs} +9 -6
- package/dist/lib/neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs.map +7 -0
- package/dist/lib/neutral/GithubPanel-QJKDJRVQ.mjs +177 -0
- package/dist/lib/neutral/GithubPanel-QJKDJRVQ.mjs.map +7 -0
- package/dist/lib/neutral/RegistryPanel-64GIYJHN.mjs +161 -0
- package/dist/lib/neutral/RegistryPanel-64GIYJHN.mjs.map +7 -0
- package/dist/lib/neutral/SpaceGenerator-Y35G6DRV.mjs +146 -0
- package/dist/lib/neutral/SpaceGenerator-Y35G6DRV.mjs.map +7 -0
- package/dist/lib/{browser/Wireframe-KAGOKEFW.mjs → neutral/Wireframe-WD7S2AUU.mjs} +9 -10
- package/dist/lib/neutral/Wireframe-WD7S2AUU.mjs.map +7 -0
- package/dist/lib/{browser/app-graph-builder-LGUQNXHD.mjs → neutral/app-graph-builder-XYLTBYKN.mjs} +246 -259
- package/dist/lib/neutral/app-graph-builder-XYLTBYKN.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +15 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HOV6MV5B.mjs +43 -0
- package/dist/lib/neutral/chunk-HOV6MV5B.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/{browser/chunk-4UFQXPP7.mjs → neutral/chunk-UAAGABXZ.mjs} +24 -12
- package/dist/lib/neutral/chunk-UAAGABXZ.mjs.map +7 -0
- package/dist/lib/{browser/SpaceGenerator-SWSGJEEL.mjs → neutral/components/index.mjs} +90 -292
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +25 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +18 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +12 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/{browser/react-context-I3USIAF6.mjs → neutral/react-context-MUZ3KVLU.mjs} +6 -6
- package/dist/lib/neutral/react-context-MUZ3KVLU.mjs.map +7 -0
- package/dist/lib/{browser/react-surface-BTVNKKVQ.mjs → neutral/react-surface-3MDMZGCA.mjs} +162 -180
- package/dist/lib/neutral/react-surface-3MDMZGCA.mjs.map +7 -0
- package/dist/lib/{browser/settings-SLTQJJNF.mjs → neutral/settings-MPM6YUP4.mjs} +7 -11
- package/dist/lib/neutral/settings-MPM6YUP4.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +91 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +14 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/DebugPlugin.d.ts +2 -5
- 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/DebugPlugin.workerd.d.ts +5 -0
- package/dist/types/src/DebugPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +11 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +2 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- 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 +106 -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 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +3 -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/presets.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +2 -2
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/index.d.ts +1 -2
- package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +3 -4
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -1
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts +1 -2
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +3 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +1 -2
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugStatus/DebugStatus.d.ts.map +1 -1
- package/dist/types/src/containers/DebugStatus/index.d.ts +1 -2
- package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +1 -2
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts +15 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +106 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts +3 -0
- package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/index.d.ts +2 -0
- package/dist/types/src/containers/GithubPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts +3 -0
- package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts.map +1 -0
- package/dist/types/src/containers/RegistryPanel/index.d.ts +2 -0
- package/dist/types/src/containers/RegistryPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts +3 -1
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceGenerator/index.d.ts +1 -2
- package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -1
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -1
- package/dist/types/src/containers/Wireframe/index.d.ts +1 -2
- package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +2 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +87 -61
- 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 +70 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +112 -71
- package/src/DebugPlugin.node.ts +18 -0
- package/src/DebugPlugin.test.ts +29 -0
- package/src/DebugPlugin.tsx +14 -10
- package/src/DebugPlugin.workerd.ts +12 -0
- package/src/capabilities/app-graph-builder.ts +433 -0
- package/src/capabilities/index.ts +6 -4
- package/src/capabilities/{react-context/react-context.tsx → react-context.tsx} +7 -2
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +179 -161
- package/src/capabilities/{settings/settings.ts → settings.ts} +4 -4
- package/src/components/DebugSettings/DebugSettings.stories.tsx +36 -0
- package/src/components/DebugSettings/DebugSettings.tsx +259 -0
- package/src/components/DebugSettings/index.ts +5 -0
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +28 -28
- package/src/components/SpaceGenerator/draw-util.ts +8 -8
- package/src/components/SpaceGenerator/presets.ts +39 -62
- package/src/components/index.ts +4 -0
- package/src/containers/DebugGraph/DebugGraph.tsx +3 -2
- package/src/containers/DebugGraph/index.ts +1 -3
- package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +49 -18
- package/src/containers/DebugObjectPanel/index.ts +1 -3
- package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +11 -24
- package/src/containers/DebugSpaceObjectsPanel/index.ts +1 -3
- package/src/containers/DebugStatus/DebugStatus.tsx +42 -19
- package/src/containers/DebugStatus/index.ts +1 -3
- package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +8 -1
- package/src/containers/DevtoolsOverviewContainer/index.ts +1 -3
- package/src/containers/GithubPanel/GithubComponent.stories.tsx +38 -0
- package/src/containers/GithubPanel/GithubComponent.tsx +192 -0
- package/src/containers/GithubPanel/GithubPanel.tsx +17 -0
- package/src/containers/GithubPanel/index.ts +5 -0
- package/src/containers/RegistryPanel/RegistryPanel.tsx +150 -0
- package/src/containers/RegistryPanel/index.ts +5 -0
- package/src/containers/SpaceGenerator/SpaceGenerator.tsx +104 -104
- package/src/containers/SpaceGenerator/index.ts +1 -3
- package/src/containers/Wireframe/Wireframe.tsx +3 -7
- package/src/containers/Wireframe/index.ts +1 -3
- package/src/containers/index.ts +2 -1
- package/src/index.ts +1 -1
- package/src/meta.ts +26 -6
- package/src/plugin.ts +10 -0
- package/src/translations.ts +83 -60
- package/src/types/Settings.ts +16 -0
- package/src/{types.ts → types/index.ts} +16 -14
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/DebugGraph-7HXJ2PS2.mjs.map +0 -7
- package/dist/lib/browser/DebugObjectPanel-3TCDNUNW.mjs +0 -33
- package/dist/lib/browser/DebugObjectPanel-3TCDNUNW.mjs.map +0 -7
- package/dist/lib/browser/DebugSettings-JZMIUDYB.mjs +0 -174
- package/dist/lib/browser/DebugSettings-JZMIUDYB.mjs.map +0 -7
- package/dist/lib/browser/DebugSpaceObjectsPanel-7NRPLWZ4.mjs.map +0 -7
- package/dist/lib/browser/DebugStatus-COQGH37G.mjs.map +0 -7
- package/dist/lib/browser/DevtoolsOverviewContainer-C75NFVER.mjs.map +0 -7
- package/dist/lib/browser/SpaceGenerator-SWSGJEEL.mjs.map +0 -7
- package/dist/lib/browser/Wireframe-KAGOKEFW.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-LGUQNXHD.mjs.map +0 -7
- package/dist/lib/browser/chunk-4UFQXPP7.mjs.map +0 -7
- package/dist/lib/browser/chunk-A5H5GRV6.mjs +0 -20
- package/dist/lib/browser/chunk-A5H5GRV6.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -132
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-context-I3USIAF6.mjs.map +0 -7
- package/dist/lib/browser/react-surface-BTVNKKVQ.mjs.map +0 -7
- package/dist/lib/browser/settings-SLTQJJNF.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context/index.d.ts +0 -7
- package/dist/types/src/capabilities/react-context/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context/react-context.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -3
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts +0 -10
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts.map +0 -1
- package/dist/types/src/containers/DebugSettings/index.d.ts +0 -3
- package/dist/types/src/containers/DebugSettings/index.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -68
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -441
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/react-context/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/settings/index.ts +0 -7
- package/src/containers/DebugSettings/DebugSettings.tsx +0 -201
- package/src/containers/DebugSettings/index.ts +0 -7
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-context/react-context.d.ts → react-context.d.ts} +0 -0
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/PLUGIN.mdl
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: org.dxos.plugin.debug
|
|
3
|
+
name: DebugPlugin
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Developer toolkit plugin for `DXOS` Composer — real-time object inspection, structured devtools panels for Client/HALO/ECHO/Mesh/EDGE subsystems, space data generation, wireframe overlays, a tools explorer, and downloadable log capture.
|
|
8
|
+
|
|
9
|
+
## Extensions
|
|
10
|
+
|
|
11
|
+
The following extension dialects are used in this document.
|
|
12
|
+
Each extension is defined in the Appendix or resolved via its URI.
|
|
13
|
+
|
|
14
|
+
| Term | URI |
|
|
15
|
+
|-------------|--------------------------------|
|
|
16
|
+
| `type` | `org.dxos.mdl.type@1.0` |
|
|
17
|
+
| `feat` | `org.dxos.mdl.feat@1.0` |
|
|
18
|
+
| `test` | `org.dxos.mdl.test@1.0` |
|
|
19
|
+
| `component` | `org.dxos.mdl.component@1.0` |
|
|
20
|
+
| `op` | `org.dxos.mdl.op@1.0` |
|
|
21
|
+
|
|
22
|
+
## Types
|
|
23
|
+
|
|
24
|
+
```mdl
|
|
25
|
+
type Settings
|
|
26
|
+
fields:
|
|
27
|
+
wireframe?: boolean # overlay every article/section surface with a labelled border
|
|
28
|
+
traceAll?: boolean # enable verbose operation tracing across all plugins
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```mdl
|
|
32
|
+
type DebugPluginOptions
|
|
33
|
+
fields:
|
|
34
|
+
logStore?: IdbLogStore # shared persistent log store for capturing and downloading logs
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```mdl
|
|
38
|
+
type DebugContextType
|
|
39
|
+
fields:
|
|
40
|
+
running: boolean
|
|
41
|
+
start(cb: TimerCallback, options: TimerOptions): void
|
|
42
|
+
stop(): void
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Components
|
|
46
|
+
|
|
47
|
+
```mdl
|
|
48
|
+
component DebugSettings
|
|
49
|
+
desc: Settings panel rendered in the plugin-settings article slot; controls wireframe and traceAll toggles and exposes log download.
|
|
50
|
+
props:
|
|
51
|
+
settings: Settings
|
|
52
|
+
logStore?: IdbLogStore
|
|
53
|
+
actions:
|
|
54
|
+
updateSettings(patch: Partial<Settings>)
|
|
55
|
+
downloadLogs()
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```mdl
|
|
59
|
+
component DebugStatus
|
|
60
|
+
desc: Status-indicator surface shown in the main toolbar; reflects the generator timer running state.
|
|
61
|
+
state:
|
|
62
|
+
running: boolean
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```mdl
|
|
66
|
+
component DevtoolsOverviewContainer
|
|
67
|
+
desc: Deck-companion panel that provides quick access to all devtools sections via a categorised link list.
|
|
68
|
+
layout: |
|
|
69
|
+
┌─────────────────────────────┐
|
|
70
|
+
│ Client ▸ Config / Storage │
|
|
71
|
+
│ Logs / Diag │
|
|
72
|
+
│ HALO ▸ Identity / Keys │
|
|
73
|
+
│ ECHO ▸ Spaces / Feeds │
|
|
74
|
+
│ Objects / Schema │
|
|
75
|
+
│ Mesh ▸ Signal / Swarm │
|
|
76
|
+
│ EDGE ▸ Dashboard / … │
|
|
77
|
+
└─────────────────────────────┘
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
```mdl
|
|
81
|
+
component DebugObjectPanel
|
|
82
|
+
desc: Companion panel for any ECHO object that shows raw field values, type info, and DXN.
|
|
83
|
+
props:
|
|
84
|
+
companionTo: string # DXN of the object being inspected
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
```mdl
|
|
88
|
+
component DebugSpaceObjectsPanel
|
|
89
|
+
desc: Deck-companion panel listing all objects in the active space with their type, ID, and field count.
|
|
90
|
+
props:
|
|
91
|
+
space: Space
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```mdl
|
|
95
|
+
component DebugGraph
|
|
96
|
+
desc: Visual representation of the Composer app-graph as a collapsible JSON tree.
|
|
97
|
+
props:
|
|
98
|
+
graph: Graph.Graph
|
|
99
|
+
root: string # node ID used as the traversal root
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
```mdl
|
|
103
|
+
component SpaceGenerator
|
|
104
|
+
desc: Article view for generating synthetic ECHO objects into a space; controls count, type mix, and relation density.
|
|
105
|
+
props:
|
|
106
|
+
space: Space
|
|
107
|
+
actions:
|
|
108
|
+
generateObjects(count: number, types: string[])
|
|
109
|
+
clear()
|
|
110
|
+
emits:
|
|
111
|
+
onCreateObjects(objects: Obj.Unknown[])
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```mdl
|
|
115
|
+
component Wireframe
|
|
116
|
+
desc: Transparent overlay that wraps any article or section surface and renders a labelled border for layout debugging.
|
|
117
|
+
props:
|
|
118
|
+
label: string # "role:name" descriptor shown in the corner badge
|
|
119
|
+
object: Obj.Unknown
|
|
120
|
+
classNames?: string
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
```mdl
|
|
124
|
+
component SchemaTable
|
|
125
|
+
desc: Tabular display of all registered ECHO schemas with typename, fields, and version.
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
```mdl
|
|
129
|
+
component GithubPanel
|
|
130
|
+
desc: Developer panel linking to open GitHub issues and CI run status for the current build.
|
|
131
|
+
```
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Components (Devtools Panels)
|
|
135
|
+
|
|
136
|
+
The following components are thin wrappers around `@dxos/devtools` panel components, each bound to a specific `Devtools.*` node:
|
|
137
|
+
|
|
138
|
+
| Component | Devtools node | Displays |
|
|
139
|
+
|------------------------|----------------------------|-----------------------------------------|
|
|
140
|
+
| ConfigPanel | Client.Config | Vault config JSON viewer |
|
|
141
|
+
| StoragePanel | Client.Storage | Local storage browser |
|
|
142
|
+
| LoggingPanel | Client.Logs | Live log stream; download via logStore |
|
|
143
|
+
| DiagnosticsPanel | Client.Diagnostics | Client health / metric charts |
|
|
144
|
+
| IdentityPanel | Halo.Identity | Local identity key + device list |
|
|
145
|
+
| DeviceListPanel | Halo.Devices | All devices paired with this identity |
|
|
146
|
+
| KeyringPanel | Halo.Keyring | Raw keyring entries |
|
|
147
|
+
| CredentialsPanel | Halo.Credentials | Credentials held in the active space |
|
|
148
|
+
| SpaceListPanel | Echo.Spaces | All spaces with state + select action |
|
|
149
|
+
| SpaceInfoPanel | Echo.Space | Selected space feeds / pipelines |
|
|
150
|
+
| FeedsPanel | Echo.Feeds | Feed entries for the active space |
|
|
151
|
+
| ObjectsPanel | Echo.Objects | All objects in the active space |
|
|
152
|
+
| SchemaPanel | Echo.Schema | Schemas registered in the active space |
|
|
153
|
+
| AutomergePanel | Echo.Automerge | Automerge document internals |
|
|
154
|
+
| QueuesPanel | Echo.Queues | Pending queue items |
|
|
155
|
+
| MembersPanel | Echo.Members | Space members with last-seen |
|
|
156
|
+
| MetadataPanel | Echo.Metadata | Space/feed metadata blobs |
|
|
157
|
+
| SignalPanel | Mesh.Signal | Signal-server connection state |
|
|
158
|
+
| SwarmPanel | Mesh.Swarm | Active swarm peers |
|
|
159
|
+
| NetworkPanel | Mesh.Network | Full network topology for active space |
|
|
160
|
+
| EdgeDashboardPanel | Edge.Dashboard | EDGE node health / worker stats |
|
|
161
|
+
| WorkflowPanel | Edge.Workflows | Workflow definitions in active space |
|
|
162
|
+
| InvocationTraceContainer | Edge.Traces | Invocation trace timeline from feed |
|
|
163
|
+
| TestingPanel | Edge.Testing | Integration test harness for EDGE |
|
|
164
|
+
| ToolsExplorer | ToolsExplorer | MCP-backed tools explorer |
|
|
165
|
+
|
|
166
|
+
## Operations
|
|
167
|
+
|
|
168
|
+
No first-party operations are defined by DebugPlugin. The plugin invokes `SpaceOperation.AddObject`, `SpaceOperation.Migrate`, `LayoutOperation.Open`, and `ScriptOperation.CreateScript` from other plugins via `useOperationInvoker` inside its surfaces.
|
|
169
|
+
|
|
170
|
+
## Features
|
|
171
|
+
|
|
172
|
+
```mdl
|
|
173
|
+
feat F-1: Devtools Graph Node
|
|
174
|
+
|
|
175
|
+
req F-1.1:
|
|
176
|
+
when: DebugPlugin is loaded
|
|
177
|
+
then: a "Devtools" node appears pinned at the end of each root and space in the nav graph
|
|
178
|
+
|
|
179
|
+
req F-1.2: The Devtools node contains sub-trees for Client, HALO, ECHO, Mesh, and EDGE categories.
|
|
180
|
+
req F-1.3: An app-graph sub-node renders DebugGraph rooted at the current space or root.
|
|
181
|
+
req F-1.4: A tools-explorer sub-node renders ToolsExplorer connected to the MCP introspect service.
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
```mdl
|
|
185
|
+
feat F-2: Object Debug Companion
|
|
186
|
+
|
|
187
|
+
req F-2.1:
|
|
188
|
+
when: any ECHO object is open in the deck
|
|
189
|
+
then: a "Debug" companion tab is injected at the last position
|
|
190
|
+
|
|
191
|
+
req F-2.2: DebugObjectPanel shows raw object fields, DXN, and typename for the companion target.
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
```mdl
|
|
195
|
+
feat F-3: Space Object Explorer
|
|
196
|
+
|
|
197
|
+
req F-3.1:
|
|
198
|
+
when: user opens the "Space Objects" deck companion
|
|
199
|
+
then: DebugSpaceObjectsPanel lists all ECHO objects in the active space
|
|
200
|
+
|
|
201
|
+
req F-3.2: List updates reactively as objects are added or removed.
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
```mdl
|
|
205
|
+
feat F-4: Devtools Overview Companion
|
|
206
|
+
|
|
207
|
+
req F-4.1:
|
|
208
|
+
when: user opens the "Devtools" deck companion
|
|
209
|
+
then: DevtoolsOverviewContainer renders a categorised link list to all devtools panels
|
|
210
|
+
|
|
211
|
+
req F-4.2: Clicking a category link navigates the deck to the corresponding devtools article.
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
```mdl
|
|
215
|
+
feat F-5: Space Data Generator
|
|
216
|
+
|
|
217
|
+
req F-5.1:
|
|
218
|
+
when: user navigates to the debug node under a space
|
|
219
|
+
then: SpaceGenerator is rendered as the article
|
|
220
|
+
|
|
221
|
+
req F-5.2:
|
|
222
|
+
when: user triggers object generation
|
|
223
|
+
then: synthetic ECHO objects are created via op:SpaceOperation.AddObject in the active collection
|
|
224
|
+
|
|
225
|
+
req F-5.3: DebugStatus indicator in the toolbar shows a running state while generation is active.
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
```mdl
|
|
229
|
+
feat F-6: Wireframe Overlay
|
|
230
|
+
|
|
231
|
+
req F-6.1:
|
|
232
|
+
when: settings.wireframe is true
|
|
233
|
+
then: Wireframe wraps every article and section surface with a labelled border
|
|
234
|
+
|
|
235
|
+
req F-6.2:
|
|
236
|
+
when: settings.wireframe is false or unset
|
|
237
|
+
then: no overlay is injected; the Wireframe surface filter returns false immediately
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
```mdl
|
|
241
|
+
feat F-7: Log Capture and Download
|
|
242
|
+
|
|
243
|
+
req F-7.1:
|
|
244
|
+
when: logStore is provided in DebugPluginOptions
|
|
245
|
+
then: LoggingPanel can stream and display captured log entries
|
|
246
|
+
|
|
247
|
+
req F-7.2:
|
|
248
|
+
when: user clicks download in DebugSettings
|
|
249
|
+
then: captured logs are serialised and offered as a file download via the file uploader capability
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
```mdl
|
|
253
|
+
feat F-8: Global Dev Utilities
|
|
254
|
+
|
|
255
|
+
req F-8.1:
|
|
256
|
+
when: DebugPlugin activates
|
|
257
|
+
then: globalThis.composer.changeStorageVersionInMetadata is registered for manual storage-migration testing
|
|
258
|
+
|
|
259
|
+
req F-8.2: The function destroys the client, rewrites the storage version metadata, and reloads the page.
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Acceptance
|
|
263
|
+
|
|
264
|
+
```mdl
|
|
265
|
+
test T-1: Devtools node appears in nav graph
|
|
266
|
+
given: Composer loaded with DebugPlugin enabled
|
|
267
|
+
when: user opens the navigation tree
|
|
268
|
+
then:
|
|
269
|
+
- "Devtools" node is visible pinned at the end of the root
|
|
270
|
+
- sub-nodes Client, HALO, ECHO, Mesh, EDGE are present
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
```mdl
|
|
274
|
+
test T-2: Debug companion on ECHO object
|
|
275
|
+
given: a Document is open in the deck
|
|
276
|
+
when: user clicks the "Debug" companion tab
|
|
277
|
+
then:
|
|
278
|
+
- DebugObjectPanel renders with the object's DXN and field map
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
```mdl
|
|
282
|
+
test T-3: Wireframe overlay toggle
|
|
283
|
+
given: DebugPlugin settings panel is open
|
|
284
|
+
when: user enables the wireframe toggle
|
|
285
|
+
then:
|
|
286
|
+
- every article and section surface shows a labelled border
|
|
287
|
+
when: user disables the wireframe toggle
|
|
288
|
+
then:
|
|
289
|
+
- borders are removed immediately
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
```mdl
|
|
293
|
+
test T-4: Space object generation
|
|
294
|
+
given: a space with an empty collection is active
|
|
295
|
+
when: user opens the debug space node and generates 10 objects
|
|
296
|
+
then:
|
|
297
|
+
- 10 new objects appear in the active collection
|
|
298
|
+
- DebugStatus shows "running" while generation is in progress
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
```mdl
|
|
302
|
+
test T-5: Log download
|
|
303
|
+
given: logStore is configured and some log entries have been captured
|
|
304
|
+
when: user clicks "Download Logs" in DebugSettings
|
|
305
|
+
then:
|
|
306
|
+
- a file download is triggered containing the serialised log entries
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Appendix: Extension Definitions
|
|
312
|
+
|
|
313
|
+
```mdl
|
|
314
|
+
ext type
|
|
315
|
+
uri: org.dxos.mdl.type@1.0
|
|
316
|
+
desc: A named data structure with typed fields and optional literals.
|
|
317
|
+
fields:
|
|
318
|
+
desc?: Prose
|
|
319
|
+
fields?: FieldMap
|
|
320
|
+
literals?: UnionList
|
|
321
|
+
extends?: TypeRef[]
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
```mdl
|
|
325
|
+
ext feat
|
|
326
|
+
uri: org.dxos.mdl.feat@1.0
|
|
327
|
+
desc: A named feature grouping one or more requirements.
|
|
328
|
+
fields:
|
|
329
|
+
desc?: Prose
|
|
330
|
+
req: RequirementList
|
|
331
|
+
nesting: self
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
```mdl
|
|
335
|
+
ext test
|
|
336
|
+
uri: org.dxos.mdl.test@1.0
|
|
337
|
+
desc: An acceptance scenario expressed as given / when / then steps.
|
|
338
|
+
fields:
|
|
339
|
+
given?: Step | Step[]
|
|
340
|
+
when?: Step | Step[]
|
|
341
|
+
then: Step | Step[]
|
|
342
|
+
tags?: TagList
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
```mdl
|
|
346
|
+
ext component
|
|
347
|
+
uri: org.dxos.mdl.component@1.0
|
|
348
|
+
desc: A UI component with props, internal state, slots, actions, and events.
|
|
349
|
+
fields:
|
|
350
|
+
desc?: Prose
|
|
351
|
+
props?: FieldMap
|
|
352
|
+
state?: FieldMap
|
|
353
|
+
slots?: FieldMap
|
|
354
|
+
actions?: ActionMap
|
|
355
|
+
emits?: EventMap
|
|
356
|
+
layout?: CodeBlock
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
```mdl
|
|
360
|
+
ext op
|
|
361
|
+
uri: org.dxos.mdl.op@1.0
|
|
362
|
+
desc: |
|
|
363
|
+
A named operation with typed inputs, outputs, and declared errors.
|
|
364
|
+
Pure ops have no effects or requires. Effectful ops declare both.
|
|
365
|
+
fields:
|
|
366
|
+
desc?: Prose
|
|
367
|
+
input?: FieldMap
|
|
368
|
+
output?: TypeExpr
|
|
369
|
+
errors?: ErrorMap
|
|
370
|
+
effects?: EffectList
|
|
371
|
+
requires?: ServiceList
|
|
372
|
+
note?: Prose
|
|
373
|
+
```
|
package/README.md
CHANGED
|
@@ -12,4 +12,4 @@ Surface plugin for kanban entities.
|
|
|
12
12
|
|
|
13
13
|
Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
|
|
14
14
|
|
|
15
|
-
License: [
|
|
15
|
+
License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2023 © DXOS
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
1
3
|
// src/containers/DebugGraph/DebugGraph.tsx
|
|
2
4
|
import React from "react";
|
|
3
5
|
import { Tree } from "@dxos/devtools";
|
|
@@ -7,10 +9,7 @@ var DebugGraph = ({ graph, root }) => {
|
|
|
7
9
|
data: Graph.toJSON(graph, root)
|
|
8
10
|
});
|
|
9
11
|
};
|
|
10
|
-
|
|
11
|
-
// src/containers/DebugGraph/index.ts
|
|
12
|
-
var DebugGraph_default = DebugGraph;
|
|
13
12
|
export {
|
|
14
|
-
|
|
13
|
+
DebugGraph as default
|
|
15
14
|
};
|
|
16
|
-
//# sourceMappingURL=DebugGraph-
|
|
15
|
+
//# sourceMappingURL=DebugGraph-G4FWS57E.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/DebugGraph/DebugGraph.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Tree } from '@dxos/devtools';\nimport { Graph } from '@dxos/plugin-graph';\n\nexport type DebugGraphProps = { graph: Graph.Graph; root: string };\n\nexport const DebugGraph = ({ graph, root }: DebugGraphProps) => {\n return <Tree data={Graph.toJSON(graph, root)} />;\n};\n"],
|
|
5
|
+
"mappings": ";;;AAIA,OAAOA,WAAW;AAElB,SAASC,YAAY;AACrB,SAASC,aAAa;AAIf,IAAMC,aAAa,CAAC,EAAEC,OAAOC,KAAI,MAAmB;AACzD,SAAO,sBAAA,cAACJ,MAAAA;IAAKK,MAAMJ,MAAMK,OAAOH,OAAOC,IAAAA;;AACzC;",
|
|
6
|
+
"names": ["React", "Tree", "Graph", "DebugGraph", "graph", "root", "data", "toJSON"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/containers/DebugObjectPanel/DebugObjectPanel.tsx
|
|
4
|
+
import React, { useMemo, useState } from "react";
|
|
5
|
+
import { ObjectsTree } from "@dxos/devtools";
|
|
6
|
+
import { Filter, Json, Obj, Query } from "@dxos/echo";
|
|
7
|
+
import { useQuery } from "@dxos/react-client/echo";
|
|
8
|
+
import { Clipboard, Input, Panel, ScrollArea, Toolbar } from "@dxos/react-ui";
|
|
9
|
+
import { Syntax } from "@dxos/react-ui-syntax-highlighter";
|
|
10
|
+
import { mx } from "@dxos/ui-theme";
|
|
11
|
+
var DebugObjectPanel = ({ role, companionTo }) => {
|
|
12
|
+
const db = Obj.getDatabase(companionTo);
|
|
13
|
+
const [selectedId, setSelectedId] = useState(null);
|
|
14
|
+
const [depth, setDepth] = useState(0);
|
|
15
|
+
const [selectedObject] = useQuery(db, Query.select(Filter.id(selectedId ?? companionTo.id)).options({
|
|
16
|
+
deleted: "include"
|
|
17
|
+
}));
|
|
18
|
+
const refReplacer = useMemo(() => db ? Json.createRefReplacer({
|
|
19
|
+
db,
|
|
20
|
+
depth
|
|
21
|
+
}) : void 0, [
|
|
22
|
+
db,
|
|
23
|
+
depth
|
|
24
|
+
]);
|
|
25
|
+
return /* @__PURE__ */ React.createElement(Clipboard.Provider, null, /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
26
|
+
role
|
|
27
|
+
}, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
|
|
28
|
+
asChild: true
|
|
29
|
+
}, /* @__PURE__ */ React.createElement(Toolbar.Root, null)), /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
30
|
+
asChild: true
|
|
31
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
32
|
+
className: mx("grid divide-y divide-separator", db && "grid-rows-[1fr_2fr]")
|
|
33
|
+
}, db && /* @__PURE__ */ React.createElement(ScrollArea.Root, null, /* @__PURE__ */ React.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React.createElement(ObjectsTree, {
|
|
34
|
+
db,
|
|
35
|
+
root: companionTo,
|
|
36
|
+
onSelect: (entity) => setSelectedId(entity.id)
|
|
37
|
+
}))), /* @__PURE__ */ React.createElement(Syntax.Root, {
|
|
38
|
+
data: selectedObject,
|
|
39
|
+
replacer: refReplacer
|
|
40
|
+
}, /* @__PURE__ */ React.createElement(Panel.Root, null, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
|
|
41
|
+
asChild: true
|
|
42
|
+
}, /* @__PURE__ */ React.createElement(Toolbar.Root, {
|
|
43
|
+
classNames: "grid grid-cols-[1fr_3rem]"
|
|
44
|
+
}, /* @__PURE__ */ React.createElement(Syntax.Filter, null), /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.TextInput, {
|
|
45
|
+
variant: "subdued",
|
|
46
|
+
type: "number",
|
|
47
|
+
min: 0,
|
|
48
|
+
step: 1,
|
|
49
|
+
"aria-label": "Ref depth",
|
|
50
|
+
value: depth,
|
|
51
|
+
onChange: (event) => setDepth(Math.max(0, Number(event.target.value) || 0))
|
|
52
|
+
})))), /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
53
|
+
asChild: true
|
|
54
|
+
}, /* @__PURE__ */ React.createElement(Syntax.Viewport, null, /* @__PURE__ */ React.createElement(Syntax.Code, null)))))))));
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
DebugObjectPanel as default
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=DebugObjectPanel-OS65NC4M.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/DebugObjectPanel/DebugObjectPanel.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo, useState } from 'react';\n\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { ObjectsTree } from '@dxos/devtools';\nimport { Filter, Json, Obj, Query } from '@dxos/echo';\nimport type { EntityId } from '@dxos/keys';\nimport { useQuery } from '@dxos/react-client/echo';\nimport { Clipboard, Input, Panel, ScrollArea, Toolbar } from '@dxos/react-ui';\nimport { Syntax } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/ui-theme';\n\nexport type DebugObjectPanelProps = Pick<\n AppSurface.ObjectArticleProps<Obj.Unknown, {}, Obj.Unknown>,\n 'role' | 'companionTo'\n>;\n\nexport const DebugObjectPanel = ({ role, companionTo }: DebugObjectPanelProps) => {\n const db = Obj.getDatabase(companionTo);\n const [selectedId, setSelectedId] = useState<EntityId | null>(null);\n const [depth, setDepth] = useState(0);\n const [selectedObject] = useQuery(\n db,\n Query.select(Filter.id(selectedId ?? companionTo.id)).options({ deleted: 'include' }),\n );\n const refReplacer = useMemo(() => (db ? Json.createRefReplacer({ db, depth }) : undefined), [db, depth]);\n\n return (\n <Clipboard.Provider>\n <Panel.Root role={role}>\n <Panel.Toolbar asChild>\n <Toolbar.Root />\n </Panel.Toolbar>\n <Panel.Content asChild>\n <div className={mx('grid divide-y divide-separator', db && 'grid-rows-[1fr_2fr]')}>\n {db && (\n <ScrollArea.Root>\n <ScrollArea.Viewport>\n <ObjectsTree db={db} root={companionTo} onSelect={(entity) => setSelectedId(entity.id)} />\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n )}\n <Syntax.Root data={selectedObject} replacer={refReplacer}>\n <Panel.Root>\n <Panel.Toolbar asChild>\n <Toolbar.Root classNames='grid grid-cols-[1fr_3rem]'>\n <Syntax.Filter />\n <Input.Root>\n <Input.TextInput\n variant='subdued'\n type='number'\n min={0}\n step={1}\n aria-label='Ref depth'\n value={depth}\n onChange={(event) => setDepth(Math.max(0, Number(event.target.value) || 0))}\n />\n </Input.Root>\n </Toolbar.Root>\n </Panel.Toolbar>\n <Panel.Content asChild>\n <Syntax.Viewport>\n <Syntax.Code />\n </Syntax.Viewport>\n </Panel.Content>\n </Panel.Root>\n </Syntax.Root>\n </div>\n </Panel.Content>\n </Panel.Root>\n </Clipboard.Provider>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;AAIA,OAAOA,SAASC,SAASC,gBAAgB;AAGzC,SAASC,mBAAmB;AAC5B,SAASC,QAAQC,MAAMC,KAAKC,aAAa;AAEzC,SAASC,gBAAgB;AACzB,SAASC,WAAWC,OAAOC,OAAOC,YAAYC,eAAe;AAC7D,SAASC,cAAc;AACvB,SAASC,UAAU;AAOZ,IAAMC,mBAAmB,CAAC,EAAEC,MAAMC,YAAW,MAAyB;AAC3E,QAAMC,KAAKb,IAAIc,YAAYF,WAAAA;AAC3B,QAAM,CAACG,YAAYC,aAAAA,IAAiBpB,SAA0B,IAAA;AAC9D,QAAM,CAACqB,OAAOC,QAAAA,IAAYtB,SAAS,CAAA;AACnC,QAAM,CAACuB,cAAAA,IAAkBjB,SACvBW,IACAZ,MAAMmB,OAAOtB,OAAOuB,GAAGN,cAAcH,YAAYS,EAAE,CAAA,EAAGC,QAAQ;IAAEC,SAAS;EAAU,CAAA,CAAA;AAErF,QAAMC,cAAc7B,QAAQ,MAAOkB,KAAKd,KAAK0B,kBAAkB;IAAEZ;IAAII;EAAM,CAAA,IAAKS,QAAY;IAACb;IAAII;GAAM;AAEvG,SACE,sBAAA,cAACd,UAAUwB,UAAQ,MACjB,sBAAA,cAACtB,MAAMuB,MAAI;IAACjB;KACV,sBAAA,cAACN,MAAME,SAAO;IAACsB,SAAAA;KACb,sBAAA,cAACtB,QAAQqB,MAAI,IAAA,CAAA,GAEf,sBAAA,cAACvB,MAAMyB,SAAO;IAACD,SAAAA;KACb,sBAAA,cAACE,OAAAA;IAAIC,WAAWvB,GAAG,kCAAkCI,MAAM,qBAAA;KACxDA,MACC,sBAAA,cAACP,WAAWsB,MAAI,MACd,sBAAA,cAACtB,WAAW2B,UAAQ,MAClB,sBAAA,cAACpC,aAAAA;IAAYgB;IAAQqB,MAAMtB;IAAauB,UAAU,CAACC,WAAWpB,cAAcoB,OAAOf,EAAE;QAI3F,sBAAA,cAACb,OAAOoB,MAAI;IAACS,MAAMlB;IAAgBmB,UAAUd;KAC3C,sBAAA,cAACnB,MAAMuB,MAAI,MACT,sBAAA,cAACvB,MAAME,SAAO;IAACsB,SAAAA;KACb,sBAAA,cAACtB,QAAQqB,MAAI;IAACW,YAAW;KACvB,sBAAA,cAAC/B,OAAOV,QAAM,IAAA,GACd,sBAAA,cAACM,MAAMwB,MAAI,MACT,sBAAA,cAACxB,MAAMoC,WAAS;IACdC,SAAQ;IACRC,MAAK;IACLC,KAAK;IACLC,MAAM;IACNC,cAAW;IACXC,OAAO7B;IACP8B,UAAU,CAACC,UAAU9B,SAAS+B,KAAKC,IAAI,GAAGC,OAAOH,MAAMI,OAAON,KAAK,KAAK,CAAA,CAAA;SAKhF,sBAAA,cAACzC,MAAMyB,SAAO;IAACD,SAAAA;KACb,sBAAA,cAACrB,OAAOyB,UAAQ,MACd,sBAAA,cAACzB,OAAO6C,MAAI,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAUhC;",
|
|
6
|
+
"names": ["React", "useMemo", "useState", "ObjectsTree", "Filter", "Json", "Obj", "Query", "useQuery", "Clipboard", "Input", "Panel", "ScrollArea", "Toolbar", "Syntax", "mx", "DebugObjectPanel", "role", "companionTo", "db", "getDatabase", "selectedId", "setSelectedId", "depth", "setDepth", "selectedObject", "select", "id", "options", "deleted", "refReplacer", "createRefReplacer", "undefined", "Provider", "Root", "asChild", "Content", "div", "className", "Viewport", "root", "onSelect", "entity", "data", "replacer", "classNames", "TextInput", "variant", "type", "min", "step", "aria-label", "value", "onChange", "event", "Math", "max", "Number", "target", "Code"]
|
|
7
|
+
}
|