@dxos/plugin-debug 0.8.4-main.e8ec1fe → 0.8.4-main.effb148878

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.
Files changed (234) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/neutral/DebugGraph-G4FWS57E.mjs +15 -0
  4. package/dist/lib/neutral/DebugGraph-G4FWS57E.mjs.map +7 -0
  5. package/dist/lib/neutral/DebugObjectPanel-UJ63CV25.mjs +59 -0
  6. package/dist/lib/neutral/DebugObjectPanel-UJ63CV25.mjs.map +7 -0
  7. package/dist/lib/neutral/DebugPlugin.mjs +47 -0
  8. package/dist/lib/neutral/DebugPlugin.mjs.map +7 -0
  9. package/dist/lib/neutral/DebugPlugin.node.mjs +18 -0
  10. package/dist/lib/neutral/DebugPlugin.node.mjs.map +7 -0
  11. package/dist/lib/neutral/DebugPlugin.workerd.mjs +12 -0
  12. package/dist/lib/neutral/DebugPlugin.workerd.mjs.map +7 -0
  13. package/dist/lib/neutral/DebugSettings-Z3XADRNK.mjs +224 -0
  14. package/dist/lib/neutral/DebugSettings-Z3XADRNK.mjs.map +7 -0
  15. package/dist/lib/neutral/DebugSpaceObjectsPanel-NISULU6U.mjs +34 -0
  16. package/dist/lib/neutral/DebugSpaceObjectsPanel-NISULU6U.mjs.map +7 -0
  17. package/dist/lib/neutral/DebugStatus-YB3KFP7G.mjs +121 -0
  18. package/dist/lib/neutral/DebugStatus-YB3KFP7G.mjs.map +7 -0
  19. package/dist/lib/neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs +23 -0
  20. package/dist/lib/neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs.map +7 -0
  21. package/dist/lib/neutral/GithubPanel-QJKDJRVQ.mjs +177 -0
  22. package/dist/lib/neutral/GithubPanel-QJKDJRVQ.mjs.map +7 -0
  23. package/dist/lib/neutral/SpaceGenerator-IQLBDY6R.mjs +143 -0
  24. package/dist/lib/neutral/SpaceGenerator-IQLBDY6R.mjs.map +7 -0
  25. package/dist/lib/neutral/Wireframe-WD7S2AUU.mjs +52 -0
  26. package/dist/lib/neutral/Wireframe-WD7S2AUU.mjs.map +7 -0
  27. package/dist/lib/neutral/app-graph-builder-ZNMWIDDF.mjs +598 -0
  28. package/dist/lib/neutral/app-graph-builder-ZNMWIDDF.mjs.map +7 -0
  29. package/dist/lib/neutral/capabilities/index.mjs +15 -0
  30. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  31. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  32. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  33. package/dist/lib/{browser/chunk-SRV2AIGJ.mjs → neutral/chunk-NFIOTQRZ.mjs} +30 -9
  34. package/dist/lib/neutral/chunk-NFIOTQRZ.mjs.map +7 -0
  35. package/dist/lib/neutral/chunk-SAJFZGX5.mjs +41 -0
  36. package/dist/lib/neutral/chunk-SAJFZGX5.mjs.map +7 -0
  37. package/dist/lib/{browser/SpaceGenerator-46TAISVE.mjs → neutral/components/index.mjs} +322 -496
  38. package/dist/lib/neutral/components/index.mjs.map +7 -0
  39. package/dist/lib/neutral/containers/index.mjs +23 -0
  40. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  41. package/dist/lib/neutral/index.mjs +18 -0
  42. package/dist/lib/neutral/index.mjs.map +7 -0
  43. package/dist/lib/neutral/meta.json +1 -0
  44. package/dist/lib/neutral/meta.mjs +8 -0
  45. package/dist/lib/neutral/meta.mjs.map +7 -0
  46. package/dist/lib/neutral/plugin.mjs +12 -0
  47. package/dist/lib/neutral/plugin.mjs.map +7 -0
  48. package/dist/lib/neutral/react-context-MUZ3KVLU.mjs +17 -0
  49. package/dist/lib/neutral/react-context-MUZ3KVLU.mjs.map +7 -0
  50. package/dist/lib/neutral/react-surface-T4NYONZ7.mjs +419 -0
  51. package/dist/lib/neutral/react-surface-T4NYONZ7.mjs.map +7 -0
  52. package/dist/lib/neutral/settings-MPM6YUP4.mjs +28 -0
  53. package/dist/lib/neutral/settings-MPM6YUP4.mjs.map +7 -0
  54. package/dist/lib/neutral/translations.mjs +90 -0
  55. package/dist/lib/neutral/translations.mjs.map +7 -0
  56. package/dist/lib/neutral/types/index.mjs +14 -0
  57. package/dist/lib/neutral/types/index.mjs.map +7 -0
  58. package/dist/types/src/DebugPlugin.d.ts +4 -1
  59. package/dist/types/src/DebugPlugin.d.ts.map +1 -1
  60. package/dist/types/src/DebugPlugin.node.d.ts +5 -0
  61. package/dist/types/src/DebugPlugin.node.d.ts.map +1 -0
  62. package/dist/types/src/DebugPlugin.test.d.ts +2 -0
  63. package/dist/types/src/DebugPlugin.test.d.ts.map +1 -0
  64. package/dist/types/src/DebugPlugin.workerd.d.ts +5 -0
  65. package/dist/types/src/DebugPlugin.workerd.d.ts.map +1 -0
  66. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  67. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  68. package/dist/types/src/capabilities/index.d.ts +8 -5
  69. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  70. package/dist/types/src/capabilities/react-context.d.ts +4 -2
  71. package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
  72. package/dist/types/src/capabilities/react-surface.d.ts +7 -2
  73. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  74. package/dist/types/src/capabilities/settings.d.ts +5 -2
  75. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  76. package/dist/types/src/components/DebugSettings/DebugSettings.d.ts +11 -0
  77. package/dist/types/src/components/DebugSettings/DebugSettings.d.ts.map +1 -0
  78. package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts +105 -0
  79. package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts.map +1 -0
  80. package/dist/types/src/components/DebugSettings/index.d.ts +2 -0
  81. package/dist/types/src/components/DebugSettings/index.d.ts.map +1 -0
  82. package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -0
  83. package/dist/types/src/components/SchemaTable/index.d.ts +2 -0
  84. package/dist/types/src/components/SchemaTable/index.d.ts.map +1 -0
  85. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +4 -5
  86. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
  87. package/dist/types/src/components/SpaceGenerator/draw-util.d.ts.map +1 -1
  88. package/dist/types/src/components/SpaceGenerator/index.d.ts +2 -2
  89. package/dist/types/src/components/SpaceGenerator/index.d.ts.map +1 -1
  90. package/dist/types/src/components/SpaceGenerator/presets.d.ts +1 -4
  91. package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
  92. package/dist/types/src/components/index.d.ts +4 -10
  93. package/dist/types/src/components/index.d.ts.map +1 -1
  94. package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +8 -0
  95. package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -0
  96. package/dist/types/src/containers/DebugGraph/index.d.ts +2 -0
  97. package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -0
  98. package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +6 -0
  99. package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -0
  100. package/dist/types/src/containers/DebugObjectPanel/index.d.ts +2 -0
  101. package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -0
  102. package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +5 -0
  103. package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -0
  104. package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +2 -0
  105. package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -0
  106. package/dist/types/src/containers/DebugStatus/DebugStatus.d.ts.map +1 -0
  107. package/dist/types/src/containers/DebugStatus/index.d.ts +2 -0
  108. package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -0
  109. package/dist/types/src/{components → containers/DevtoolsOverviewContainer}/DevtoolsOverviewContainer.d.ts +0 -1
  110. package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -0
  111. package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +2 -0
  112. package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -0
  113. package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts +15 -0
  114. package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts.map +1 -0
  115. package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +105 -0
  116. package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts.map +1 -0
  117. package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts +3 -0
  118. package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts.map +1 -0
  119. package/dist/types/src/containers/GithubPanel/index.d.ts +2 -0
  120. package/dist/types/src/containers/GithubPanel/index.d.ts.map +1 -0
  121. package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts +11 -0
  122. package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -0
  123. package/dist/types/src/containers/SpaceGenerator/index.d.ts +2 -0
  124. package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -0
  125. package/dist/types/src/{components → containers/Wireframe}/Wireframe.d.ts +1 -1
  126. package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -0
  127. package/dist/types/src/containers/Wireframe/index.d.ts +2 -0
  128. package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -0
  129. package/dist/types/src/containers/index.d.ts +10 -0
  130. package/dist/types/src/containers/index.d.ts.map +1 -0
  131. package/dist/types/src/index.d.ts +1 -1
  132. package/dist/types/src/index.d.ts.map +1 -1
  133. package/dist/types/src/meta.d.ts +2 -2
  134. package/dist/types/src/meta.d.ts.map +1 -1
  135. package/dist/types/src/plugin.d.ts +4 -0
  136. package/dist/types/src/plugin.d.ts.map +1 -0
  137. package/dist/types/src/translations.d.ts +86 -59
  138. package/dist/types/src/translations.d.ts.map +1 -1
  139. package/dist/types/src/types/Settings.d.ts +8 -0
  140. package/dist/types/src/types/Settings.d.ts.map +1 -0
  141. package/dist/types/src/types/index.d.ts +69 -0
  142. package/dist/types/src/types/index.d.ts.map +1 -0
  143. package/dist/types/tsconfig.tsbuildinfo +1 -1
  144. package/package.json +134 -76
  145. package/src/DebugPlugin.node.ts +18 -0
  146. package/src/DebugPlugin.test.ts +29 -0
  147. package/src/DebugPlugin.tsx +28 -34
  148. package/src/DebugPlugin.workerd.ts +12 -0
  149. package/src/capabilities/app-graph-builder.ts +381 -388
  150. package/src/capabilities/index.ts +5 -5
  151. package/src/capabilities/react-context.tsx +16 -7
  152. package/src/capabilities/react-surface.tsx +376 -356
  153. package/src/capabilities/settings.ts +24 -12
  154. package/src/components/DebugSettings/DebugSettings.stories.tsx +36 -0
  155. package/src/components/DebugSettings/DebugSettings.tsx +262 -0
  156. package/src/components/DebugSettings/index.ts +5 -0
  157. package/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.tsx +2 -2
  158. package/src/components/SchemaTable/index.ts +5 -0
  159. package/src/components/SpaceGenerator/ObjectGenerator.tsx +30 -34
  160. package/src/components/SpaceGenerator/draw-util.ts +8 -8
  161. package/src/components/SpaceGenerator/index.ts +2 -3
  162. package/src/components/SpaceGenerator/presets.ts +209 -112
  163. package/src/components/index.ts +4 -8
  164. package/src/containers/DebugGraph/DebugGraph.tsx +14 -0
  165. package/src/containers/DebugGraph/index.ts +5 -0
  166. package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +76 -0
  167. package/src/containers/DebugObjectPanel/index.ts +5 -0
  168. package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +47 -0
  169. package/src/containers/DebugSpaceObjectsPanel/index.ts +5 -0
  170. package/src/{components → containers/DebugStatus}/DebugStatus.tsx +41 -19
  171. package/src/containers/DebugStatus/index.ts +5 -0
  172. package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +25 -0
  173. package/src/containers/DevtoolsOverviewContainer/index.ts +5 -0
  174. package/src/containers/GithubPanel/GithubComponent.stories.tsx +38 -0
  175. package/src/containers/GithubPanel/GithubComponent.tsx +192 -0
  176. package/src/containers/GithubPanel/GithubPanel.tsx +17 -0
  177. package/src/containers/GithubPanel/index.ts +5 -0
  178. package/src/containers/SpaceGenerator/SpaceGenerator.tsx +126 -0
  179. package/src/containers/SpaceGenerator/index.ts +5 -0
  180. package/src/{components → containers/Wireframe}/Wireframe.tsx +6 -10
  181. package/src/containers/Wireframe/index.ts +5 -0
  182. package/src/containers/index.ts +14 -0
  183. package/src/index.ts +1 -1
  184. package/src/meta.ts +24 -5
  185. package/src/plugin.ts +10 -0
  186. package/src/translations.ts +82 -58
  187. package/src/types/Settings.ts +16 -0
  188. package/src/{types.ts → types/index.ts} +20 -11
  189. package/dist/lib/browser/DebugGraph-EDOH6R2G.mjs +0 -20
  190. package/dist/lib/browser/DebugGraph-EDOH6R2G.mjs.map +0 -7
  191. package/dist/lib/browser/DevtoolsOverviewContainer-JXVZVPHN.mjs +0 -25
  192. package/dist/lib/browser/DevtoolsOverviewContainer-JXVZVPHN.mjs.map +0 -7
  193. package/dist/lib/browser/SpaceGenerator-46TAISVE.mjs.map +0 -7
  194. package/dist/lib/browser/app-graph-builder-CRH2HJKT.mjs +0 -588
  195. package/dist/lib/browser/app-graph-builder-CRH2HJKT.mjs.map +0 -7
  196. package/dist/lib/browser/chunk-SRV2AIGJ.mjs.map +0 -7
  197. package/dist/lib/browser/chunk-WZFZ4ESO.mjs +0 -20
  198. package/dist/lib/browser/chunk-WZFZ4ESO.mjs.map +0 -7
  199. package/dist/lib/browser/index.mjs +0 -130
  200. package/dist/lib/browser/index.mjs.map +0 -7
  201. package/dist/lib/browser/meta.json +0 -1
  202. package/dist/lib/browser/react-context-P2YDWEWI.mjs +0 -16
  203. package/dist/lib/browser/react-context-P2YDWEWI.mjs.map +0 -7
  204. package/dist/lib/browser/react-surface-2SNVZDEA.mjs +0 -774
  205. package/dist/lib/browser/react-surface-2SNVZDEA.mjs.map +0 -7
  206. package/dist/lib/browser/settings-SQXR3OAH.mjs +0 -22
  207. package/dist/lib/browser/settings-SQXR3OAH.mjs.map +0 -7
  208. package/dist/types/src/components/Container.d.ts +0 -5
  209. package/dist/types/src/components/Container.d.ts.map +0 -1
  210. package/dist/types/src/components/DebugGraph.d.ts +0 -8
  211. package/dist/types/src/components/DebugGraph.d.ts.map +0 -1
  212. package/dist/types/src/components/DebugObjectPanel.d.ts +0 -7
  213. package/dist/types/src/components/DebugObjectPanel.d.ts.map +0 -1
  214. package/dist/types/src/components/DebugSettings.d.ts +0 -6
  215. package/dist/types/src/components/DebugSettings.d.ts.map +0 -1
  216. package/dist/types/src/components/DebugStatus.d.ts.map +0 -1
  217. package/dist/types/src/components/DevtoolsOverviewContainer.d.ts.map +0 -1
  218. package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts.map +0 -1
  219. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +0 -9
  220. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +0 -1
  221. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts +0 -15
  222. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts.map +0 -1
  223. package/dist/types/src/components/Wireframe.d.ts.map +0 -1
  224. package/dist/types/src/types.d.ts +0 -63
  225. package/dist/types/src/types.d.ts.map +0 -1
  226. package/src/components/Container.tsx +0 -15
  227. package/src/components/DebugGraph.tsx +0 -14
  228. package/src/components/DebugObjectPanel.tsx +0 -33
  229. package/src/components/DebugSettings.tsx +0 -180
  230. package/src/components/DevtoolsOverviewContainer.tsx +0 -20
  231. package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +0 -52
  232. package/src/components/SpaceGenerator/SpaceGenerator.tsx +0 -122
  233. /package/dist/types/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.d.ts +0 -0
  234. /package/dist/types/src/{components → containers/DebugStatus}/DebugStatus.d.ts +0 -0
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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/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: [MIT](./LICENSE) Copyright 2023 © DXOS
15
+ License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2023 © DXOS
@@ -0,0 +1,15 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/containers/DebugGraph/DebugGraph.tsx
4
+ import React from "react";
5
+ import { Tree } from "@dxos/devtools";
6
+ import { Graph } from "@dxos/plugin-graph";
7
+ var DebugGraph = ({ graph, root }) => {
8
+ return /* @__PURE__ */ React.createElement(Tree, {
9
+ data: Graph.toJSON(graph, root)
10
+ });
11
+ };
12
+ export {
13
+ DebugGraph as default
14
+ };
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-UJ63CV25.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 { ObjectId } 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<ObjectId | 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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,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
+ }
@@ -0,0 +1,47 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/DebugPlugin.tsx
4
+ import * as Effect from "effect/Effect";
5
+ import { ActivationEvents, Capability, Plugin } from "@dxos/app-framework";
6
+ import { AppPlugin } from "@dxos/app-toolkit";
7
+ import { AppGraphBuilder, DebugSettings, ReactContext, ReactSurface } from "#capabilities";
8
+ import { meta } from "#meta";
9
+ import { translations } from "#translations";
10
+ var DebugPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
11
+ activate: AppGraphBuilder
12
+ }), AppPlugin.addReactContextModule({
13
+ activate: ReactContext
14
+ }), AppPlugin.addSettingsModule({
15
+ activate: DebugSettings
16
+ }), Plugin.addModule(({ logStore }) => ({
17
+ id: Capability.getModuleTag(ReactSurface) ?? "surfaces",
18
+ activatesOn: ActivationEvents.SetupReactSurface,
19
+ activate: () => ReactSurface({
20
+ logStore
21
+ })
22
+ })), AppPlugin.addTranslationsModule({
23
+ translations
24
+ }), Plugin.addModule({
25
+ id: "setup-devtools",
26
+ activatesOn: ActivationEvents.Startup,
27
+ activate: () => Effect.sync(() => setupDevtools())
28
+ }), Plugin.make);
29
+ var setupDevtools = () => {
30
+ globalThis.composer ??= {};
31
+ globalThis.composer.changeStorageVersionInMetadata = async (version) => {
32
+ const { changeStorageVersionInMetadata } = await import("@dxos/echo-pipeline/testing");
33
+ const { createStorageObjects } = await import("@dxos/client-services");
34
+ const client = window.dxos.client;
35
+ const config = client.config;
36
+ await client.destroy();
37
+ const { storage } = createStorageObjects(config.values?.runtime?.client?.storage ?? {});
38
+ await changeStorageVersionInMetadata(storage, version);
39
+ location.pathname = "/";
40
+ };
41
+ };
42
+ var DebugPlugin_default = DebugPlugin;
43
+ export {
44
+ DebugPlugin,
45
+ DebugPlugin_default as default
46
+ };
47
+ //# sourceMappingURL=DebugPlugin.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/DebugPlugin.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { type Client } from '@dxos/react-client';\n\nimport { AppGraphBuilder, DebugSettings, ReactContext, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { type DebugPluginOptions } from '#types';\n\n// TODO(wittjosiah): Factor out DevtoolsPlugin?\n\nexport const DebugPlugin = Plugin.define<DebugPluginOptions>(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addReactContextModule({ activate: ReactContext }),\n AppPlugin.addSettingsModule({ activate: DebugSettings }),\n Plugin.addModule(({ logStore }) => ({\n id: Capability.getModuleTag(ReactSurface) ?? 'surfaces',\n activatesOn: ActivationEvents.SetupReactSurface,\n activate: () => ReactSurface({ logStore }),\n })),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'setup-devtools',\n activatesOn: ActivationEvents.Startup,\n activate: () => Effect.sync(() => setupDevtools()),\n }),\n Plugin.make,\n);\n\nconst setupDevtools = () => {\n (globalThis as any).composer ??= {};\n\n // Used to test how composer handles breaking protocol changes.\n (globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {\n const { changeStorageVersionInMetadata } = await import('@dxos/echo-pipeline/testing');\n const { createStorageObjects } = await import('@dxos/client-services');\n const client: Client = (window as any).dxos.client;\n const config = client.config;\n await client.destroy();\n const { storage } = createStorageObjects(config.values?.runtime?.client?.storage ?? {});\n await changeStorageVersionInMetadata(storage, version);\n location.pathname = '/';\n };\n};\n\nexport default DebugPlugin;\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkBC,YAAYC,cAAc;AACrD,SAASC,iBAAiB;AAG1B,SAASC,iBAAiBC,eAAeC,cAAcC,oBAAoB;AAC3E,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAKtB,IAAMC,cAAcR,OAAOS,OAA2BH,IAAAA,EAAMI,KACjET,UAAUU,kBAAkB;EAAEC,UAAUV;AAAgB,CAAA,GACxDD,UAAUY,sBAAsB;EAAED,UAAUR;AAAa,CAAA,GACzDH,UAAUa,kBAAkB;EAAEF,UAAUT;AAAc,CAAA,GACtDH,OAAOe,UAAU,CAAC,EAAEC,SAAQ,OAAQ;EAClCC,IAAIlB,WAAWmB,aAAab,YAAAA,KAAiB;EAC7Cc,aAAarB,iBAAiBsB;EAC9BR,UAAU,MAAMP,aAAa;IAAEW;EAAS,CAAA;AAC1C,EAAA,GACAf,UAAUoB,sBAAsB;EAAEd;AAAa,CAAA,GAC/CP,OAAOe,UAAU;EACfE,IAAI;EACJE,aAAarB,iBAAiBwB;EAC9BV,UAAU,MAAaW,YAAK,MAAMC,cAAAA,CAAAA;AACpC,CAAA,GACAxB,OAAOyB,IAAI;AAGb,IAAMD,gBAAgB,MAAA;AACnBE,aAAmBC,aAAa,CAAC;AAGjCD,aAAmBC,SAASC,iCAAiC,OAAOC,YAAAA;AACnE,UAAM,EAAED,+BAA8B,IAAK,MAAM,OAAO,6BAAA;AACxD,UAAM,EAAEE,qBAAoB,IAAK,MAAM,OAAO,uBAAA;AAC9C,UAAMC,SAAkBC,OAAeC,KAAKF;AAC5C,UAAMG,SAASH,OAAOG;AACtB,UAAMH,OAAOI,QAAO;AACpB,UAAM,EAAEC,QAAO,IAAKN,qBAAqBI,OAAOG,QAAQC,SAASP,QAAQK,WAAW,CAAC,CAAA;AACrF,UAAMR,+BAA+BQ,SAASP,OAAAA;AAC9CU,aAASC,WAAW;EACtB;AACF;AAEA,IAAA,sBAAehC;",
6
+ "names": ["Effect", "ActivationEvents", "Capability", "Plugin", "AppPlugin", "AppGraphBuilder", "DebugSettings", "ReactContext", "ReactSurface", "meta", "translations", "DebugPlugin", "define", "pipe", "addAppGraphModule", "activate", "addReactContextModule", "addSettingsModule", "addModule", "logStore", "id", "getModuleTag", "activatesOn", "SetupReactSurface", "addTranslationsModule", "Startup", "sync", "setupDevtools", "make", "globalThis", "composer", "changeStorageVersionInMetadata", "version", "createStorageObjects", "client", "window", "dxos", "config", "destroy", "storage", "values", "runtime", "location", "pathname"]
7
+ }
@@ -0,0 +1,18 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/DebugPlugin.node.ts
4
+ import { Plugin } from "@dxos/app-framework";
5
+ import { AppPlugin } from "@dxos/app-toolkit";
6
+ import { AppGraphBuilder, DebugSettings } from "#capabilities";
7
+ import { meta } from "#meta";
8
+ var DebugPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
9
+ activate: AppGraphBuilder
10
+ }), AppPlugin.addSettingsModule({
11
+ activate: DebugSettings
12
+ }), Plugin.make);
13
+ var DebugPlugin_node_default = DebugPlugin;
14
+ export {
15
+ DebugPlugin,
16
+ DebugPlugin_node_default as default
17
+ };
18
+ //# sourceMappingURL=DebugPlugin.node.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/DebugPlugin.node.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder, DebugSettings } from '#capabilities';\nimport { meta } from '#meta';\nimport { type DebugPluginOptions } from '#types';\n\nexport const DebugPlugin = Plugin.define<DebugPluginOptions>(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addSettingsModule({ activate: DebugSettings }),\n Plugin.make,\n);\n\nexport default DebugPlugin;\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,iBAAiBC,qBAAqB;AAC/C,SAASC,YAAY;AAGd,IAAMC,cAAcL,OAAOM,OAA2BF,IAAAA,EAAMG,KACjEN,UAAUO,kBAAkB;EAAEC,UAAUP;AAAgB,CAAA,GACxDD,UAAUS,kBAAkB;EAAED,UAAUN;AAAc,CAAA,GACtDH,OAAOW,IAAI;AAGb,IAAA,2BAAeN;",
6
+ "names": ["Plugin", "AppPlugin", "AppGraphBuilder", "DebugSettings", "meta", "DebugPlugin", "define", "pipe", "addAppGraphModule", "activate", "addSettingsModule", "make"]
7
+ }
@@ -0,0 +1,12 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/DebugPlugin.workerd.ts
4
+ import { Plugin } from "@dxos/app-framework";
5
+ import { meta } from "#meta";
6
+ var DebugPlugin = Plugin.define(meta).pipe(Plugin.make);
7
+ var DebugPlugin_workerd_default = DebugPlugin;
8
+ export {
9
+ DebugPlugin,
10
+ DebugPlugin_workerd_default as default
11
+ };
12
+ //# sourceMappingURL=DebugPlugin.workerd.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/DebugPlugin.workerd.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\nimport { type DebugPluginOptions } from '#types';\n\nexport const DebugPlugin = Plugin.define<DebugPluginOptions>(meta).pipe(Plugin.make);\n\nexport default DebugPlugin;\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;AAEvB,SAASC,YAAY;AAGd,IAAMC,cAAcF,OAAOG,OAA2BF,IAAAA,EAAMG,KAAKJ,OAAOK,IAAI;AAEnF,IAAA,8BAAeH;",
6
+ "names": ["Plugin", "meta", "DebugPlugin", "define", "pipe", "make"]
7
+ }
@@ -0,0 +1,224 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/components/DebugSettings/DebugSettings.tsx
4
+ import React, { useCallback, useEffect, useMemo, useState } from "react";
5
+ import { getPersonalSpace } from "@dxos/app-toolkit";
6
+ import { SaveConfig, Storage, defs } from "@dxos/config";
7
+ import { log } from "@dxos/log";
8
+ import { useClient } from "@dxos/react-client";
9
+ import { Icon, IconButton, Input, Select, Toast, useFileDownload, useTranslation } from "@dxos/react-ui";
10
+ import { Settings as SettingsForm } from "@dxos/react-ui-form";
11
+ import { TRACE_ALL_KEY } from "@dxos/tracing";
12
+ import { setDeep } from "@dxos/util";
13
+ import { meta } from "#meta";
14
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-debug/src/components/DebugSettings/DebugSettings.tsx";
15
+ var StorageAdapters = {
16
+ opfs: defs.Runtime.Client.Storage.StorageDriver.WEBFS,
17
+ idb: defs.Runtime.Client.Storage.StorageDriver.IDB
18
+ };
19
+ var DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }) => {
20
+ const { t } = useTranslation(meta.id);
21
+ const [toast, setToast] = useState();
22
+ const download = useFileDownload();
23
+ const [storageConfig, setStorageConfig] = useState({});
24
+ const client = useClient();
25
+ useEffect(() => {
26
+ void Storage().then((config) => setStorageConfig(config));
27
+ }, []);
28
+ const handleToast = useCallback((toast2) => {
29
+ setToast(toast2);
30
+ const timer = setTimeout(() => setToast(void 0), 5e3);
31
+ return () => clearTimeout(timer);
32
+ }, [
33
+ setToast
34
+ ]);
35
+ const handleDownload = useCallback(async () => {
36
+ const data = await client.diagnostics();
37
+ const file = new Blob([
38
+ JSON.stringify(data, void 0, 2)
39
+ ], {
40
+ type: "text/plain"
41
+ });
42
+ const fileName = `composer-${(/* @__PURE__ */ new Date()).toISOString().replace(/\W/g, "-")}.json`;
43
+ download(file, fileName);
44
+ if (onUpload) {
45
+ const personalSpace = getPersonalSpace(client);
46
+ if (!personalSpace) {
47
+ log.error("no personal space available for upload", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 46, S: void 0 });
48
+ return;
49
+ }
50
+ const info = await onUpload(personalSpace.db, new File([
51
+ file
52
+ ], fileName));
53
+ if (!info) {
54
+ log.error("diagnostics failed to upload to IPFS", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 53, S: void 0 });
55
+ return;
56
+ }
57
+ handleToast({
58
+ title: t("settings.uploaded.message"),
59
+ description: t("settings.uploaded.description")
60
+ });
61
+ const url = client.config.values.runtime.services.ipfs.gateway + "/" + info.cid;
62
+ void navigator.clipboard.writeText(url);
63
+ handleToast({
64
+ title: t("settings.uploaded.message"),
65
+ description: t("settings.uploaded.description")
66
+ });
67
+ log.info("diagnostics", {
68
+ url
69
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 67, S: void 0 });
70
+ }
71
+ }, [
72
+ client,
73
+ download,
74
+ handleToast,
75
+ onUpload,
76
+ t
77
+ ]);
78
+ const handleDownloadLogs = useCallback(async () => {
79
+ const ndjson = await logStore.export();
80
+ const file = new Blob([
81
+ ndjson
82
+ ], {
83
+ type: "application/x-ndjson"
84
+ });
85
+ const fileName = `composer-logs-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace(/:/g, "-")}.ndjson`;
86
+ download(file, fileName);
87
+ }, [
88
+ download,
89
+ logStore
90
+ ]);
91
+ const handleRepair = useCallback(async () => {
92
+ try {
93
+ const info = await client.repair();
94
+ setStorageConfig(await Storage());
95
+ handleToast({
96
+ title: t("settings.repair-success.message"),
97
+ description: JSON.stringify(info, void 0, 2)
98
+ });
99
+ } catch (err) {
100
+ handleToast({
101
+ title: t("settings.repair-failed.message"),
102
+ description: err.message
103
+ });
104
+ }
105
+ }, [
106
+ client,
107
+ handleToast,
108
+ t
109
+ ]);
110
+ const handleWireframeChange = useCallback((checked) => onSettingsChange?.((s) => ({
111
+ ...s,
112
+ wireframe: !!checked
113
+ })), [
114
+ onSettingsChange
115
+ ]);
116
+ const traceAll = useMemo(() => settings.traceAll ?? (typeof localStorage !== "undefined" && localStorage.getItem(TRACE_ALL_KEY) === "true"), [
117
+ settings.traceAll
118
+ ]);
119
+ const handleTraceAllChange = useCallback((checked) => {
120
+ const value = !!checked;
121
+ localStorage.setItem(TRACE_ALL_KEY, String(value));
122
+ onSettingsChange?.((s) => ({
123
+ ...s,
124
+ traceAll: value
125
+ }));
126
+ }, [
127
+ onSettingsChange
128
+ ]);
129
+ const handleOpenTracingPanel = useCallback(() => {
130
+ window.open("about:blank", "_blank");
131
+ }, []);
132
+ const handleStorageAdapterChange = useCallback((value) => {
133
+ if (confirm(t("settings.storage-adapter.changed-alert.message"))) {
134
+ updateConfig(storageConfig, setStorageConfig, [
135
+ "runtime",
136
+ "client",
137
+ "storage",
138
+ "dataStore"
139
+ ], StorageAdapters[value]);
140
+ }
141
+ }, [
142
+ storageConfig,
143
+ t
144
+ ]);
145
+ return /* @__PURE__ */ React.createElement(SettingsForm.Viewport, null, /* @__PURE__ */ React.createElement(SettingsForm.Section, {
146
+ title: t("settings.title", {
147
+ ns: meta.id
148
+ })
149
+ }, /* @__PURE__ */ React.createElement(SettingsForm.Item, {
150
+ title: t("settings.wireframe.label"),
151
+ description: t("settings.wireframe.description")
152
+ }, /* @__PURE__ */ React.createElement(Input.Switch, {
153
+ disabled: !onSettingsChange,
154
+ checked: settings.wireframe,
155
+ onCheckedChange: handleWireframeChange
156
+ })), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
157
+ title: t("settings.trace-all.label"),
158
+ description: t("settings.trace-all.description")
159
+ }, /* @__PURE__ */ React.createElement(Input.Switch, {
160
+ disabled: !onSettingsChange,
161
+ checked: traceAll,
162
+ onCheckedChange: handleTraceAllChange
163
+ })), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
164
+ title: t("settings.tracing-panel.label"),
165
+ description: t("settings.tracing-panel.description")
166
+ }, /* @__PURE__ */ React.createElement(IconButton, {
167
+ icon: "ph--arrow-square-out--regular",
168
+ iconOnly: true,
169
+ label: t("settings.tracing-panel.label"),
170
+ onClick: handleOpenTracingPanel
171
+ })), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
172
+ title: t("settings.download-diagnostics.label"),
173
+ description: t("settings.download-diagnostics.description")
174
+ }, /* @__PURE__ */ React.createElement(IconButton, {
175
+ icon: "ph--download-simple--regular",
176
+ iconOnly: true,
177
+ label: t("settings.download-diagnostics.label"),
178
+ onClick: handleDownload
179
+ })), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
180
+ title: t("settings.download-logs.label"),
181
+ description: t("settings.download-logs.description")
182
+ }, /* @__PURE__ */ React.createElement(IconButton, {
183
+ icon: "ph--download-simple--regular",
184
+ iconOnly: true,
185
+ label: t("settings.download-logs.label"),
186
+ onClick: handleDownloadLogs
187
+ })), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
188
+ title: t("settings.repair.label"),
189
+ description: t("settings.repair.description")
190
+ }, /* @__PURE__ */ React.createElement(IconButton, {
191
+ icon: "ph--first-aid-kit--regular",
192
+ iconOnly: true,
193
+ label: t("settings.repair.label"),
194
+ onClick: handleRepair
195
+ })), toast && /* @__PURE__ */ React.createElement(Toast.Root, null, /* @__PURE__ */ React.createElement(Toast.Body, null, /* @__PURE__ */ React.createElement(Toast.Title, null, /* @__PURE__ */ React.createElement(Icon, {
196
+ icon: "ph--gift--duotone",
197
+ classNames: "inline mr-1"
198
+ }), /* @__PURE__ */ React.createElement("span", null, toast.title)), toast.description && /* @__PURE__ */ React.createElement(Toast.Description, null, toast.description))), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
199
+ title: t("settings.choose-storage-adaptor.label"),
200
+ description: t("settings.choose-storage-adaptor.description")
201
+ }, /* @__PURE__ */ React.createElement(Select.Root, {
202
+ disabled: !onSettingsChange,
203
+ value: Object.entries(StorageAdapters).find(([_name, value]) => value === storageConfig?.runtime?.client?.storage?.dataStore)?.[0],
204
+ onValueChange: handleStorageAdapterChange
205
+ }, /* @__PURE__ */ React.createElement(Select.TriggerButton, {
206
+ disabled: !onSettingsChange,
207
+ placeholder: t("settings.data-store.label")
208
+ }), /* @__PURE__ */ React.createElement(Select.Portal, null, /* @__PURE__ */ React.createElement(Select.Content, null, /* @__PURE__ */ React.createElement(Select.Viewport, null, Object.keys(StorageAdapters).map((key) => /* @__PURE__ */ React.createElement(Select.Option, {
209
+ key,
210
+ value: key
211
+ }, t(`settings.storage-adaptor.${key}.label`)))), /* @__PURE__ */ React.createElement(Select.Arrow, null)))))));
212
+ };
213
+ var updateConfig = (config, setConfig, path, value) => {
214
+ const storageConfigCopy = JSON.parse(JSON.stringify(config ?? {}));
215
+ setDeep(storageConfigCopy, path, value);
216
+ setConfig(storageConfigCopy);
217
+ queueMicrotask(async () => {
218
+ await SaveConfig(storageConfigCopy);
219
+ });
220
+ };
221
+ export {
222
+ DebugSettings as default
223
+ };
224
+ //# sourceMappingURL=DebugSettings-Z3XADRNK.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/DebugSettings/DebugSettings.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { AppCapabilities, getPersonalSpace } from '@dxos/app-toolkit';\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { type ConfigProto, SaveConfig, Storage, defs } from '@dxos/config';\nimport { log } from '@dxos/log';\nimport { type IdbLogStore } from '@dxos/log-store-idb';\nimport { useClient } from '@dxos/react-client';\nimport { Icon, IconButton, Input, Select, Toast, useFileDownload, useTranslation } from '@dxos/react-ui';\nimport { Settings as SettingsForm } from '@dxos/react-ui-form';\nimport { TRACE_ALL_KEY } from '@dxos/tracing';\nimport { setDeep } from '@dxos/util';\n\nimport { meta } from '#meta';\nimport { type Settings } from '#types';\n\ntype Toast = {\n title: string;\n description?: string;\n};\n\nconst StorageAdapters = {\n opfs: defs.Runtime.Client.Storage.StorageDriver.WEBFS,\n idb: defs.Runtime.Client.Storage.StorageDriver.IDB,\n} as const;\n\nexport type DebugSettingsProps = AppSurface.SettingsArticleProps<\n Settings.Settings,\n {\n logStore: IdbLogStore;\n onUpload?: AppCapabilities.FileUploader;\n }\n>;\n\nexport const DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }: DebugSettingsProps) => {\n const { t } = useTranslation(meta.id);\n const [toast, setToast] = useState<Toast>();\n const download = useFileDownload();\n const [storageConfig, setStorageConfig] = useState<ConfigProto>({});\n const client = useClient();\n\n useEffect(() => {\n void Storage().then((config) => setStorageConfig(config));\n }, []);\n\n const handleToast = useCallback(\n (toast: Toast) => {\n setToast(toast);\n const timer = setTimeout(() => setToast(undefined), 5_000);\n return () => clearTimeout(timer);\n },\n [setToast],\n );\n\n const handleDownload = useCallback(async () => {\n const data = await client.diagnostics();\n const file = new Blob([JSON.stringify(data, undefined, 2)], {\n type: 'text/plain',\n });\n const fileName = `composer-${new Date().toISOString().replace(/\\W/g, '-')}.json`;\n download(file, fileName);\n\n if (onUpload) {\n const personalSpace = getPersonalSpace(client);\n if (!personalSpace) {\n log.error('no personal space available for upload');\n return;\n }\n const info = await onUpload(personalSpace.db, new File([file], fileName));\n if (!info) {\n log.error('diagnostics failed to upload to IPFS');\n return;\n }\n handleToast({\n title: t('settings.uploaded.message'),\n description: t('settings.uploaded.description'),\n });\n\n // TODO(nf): move to IpfsPlugin?\n const url = client.config.values.runtime!.services!.ipfs!.gateway + '/' + info.cid;\n void navigator.clipboard.writeText(url);\n handleToast({\n title: t('settings.uploaded.message'),\n description: t('settings.uploaded.description'),\n });\n log.info('diagnostics', { url });\n }\n }, [client, download, handleToast, onUpload, t]);\n\n const handleDownloadLogs = useCallback(async () => {\n const ndjson = await logStore.export();\n const file = new Blob([ndjson], { type: 'application/x-ndjson' });\n const fileName = `composer-logs-${new Date().toISOString().slice(0, 19).replace(/:/g, '-')}.ndjson`;\n download(file, fileName);\n }, [download, logStore]);\n\n const handleRepair = useCallback(async () => {\n try {\n const info = await client.repair();\n setStorageConfig(await Storage());\n handleToast({\n title: t('settings.repair-success.message'),\n description: JSON.stringify(info, undefined, 2),\n });\n } catch (err: any) {\n handleToast({\n title: t('settings.repair-failed.message'),\n description: err.message,\n });\n }\n }, [client, handleToast, t]);\n\n const handleWireframeChange = useCallback(\n (checked: boolean) => onSettingsChange?.((s) => ({ ...s, wireframe: !!checked })),\n [onSettingsChange],\n );\n\n const traceAll = useMemo(\n () => settings.traceAll ?? (typeof localStorage !== 'undefined' && localStorage.getItem(TRACE_ALL_KEY) === 'true'),\n [settings.traceAll],\n );\n\n const handleTraceAllChange = useCallback(\n (checked: boolean) => {\n const value = !!checked;\n localStorage.setItem(TRACE_ALL_KEY, String(value));\n onSettingsChange?.((s) => ({ ...s, traceAll: value }));\n },\n [onSettingsChange],\n );\n\n const handleOpenTracingPanel = useCallback(() => {\n window.open('about:blank', '_blank');\n }, []);\n\n const handleStorageAdapterChange = useCallback(\n (value: string) => {\n if (confirm(t('settings.storage-adapter.changed-alert.message'))) {\n updateConfig(\n storageConfig,\n setStorageConfig,\n ['runtime', 'client', 'storage', 'dataStore'],\n StorageAdapters[value as keyof typeof StorageAdapters],\n );\n }\n },\n [storageConfig, t],\n );\n\n return (\n <SettingsForm.Viewport>\n <SettingsForm.Section title={t('settings.title', { ns: meta.id })}>\n <SettingsForm.Item title={t('settings.wireframe.label')} description={t('settings.wireframe.description')}>\n <Input.Switch\n disabled={!onSettingsChange}\n checked={settings.wireframe}\n onCheckedChange={handleWireframeChange}\n />\n </SettingsForm.Item>\n <SettingsForm.Item title={t('settings.trace-all.label')} description={t('settings.trace-all.description')}>\n <Input.Switch disabled={!onSettingsChange} checked={traceAll} onCheckedChange={handleTraceAllChange} />\n </SettingsForm.Item>\n <SettingsForm.Item\n title={t('settings.tracing-panel.label')}\n description={t('settings.tracing-panel.description')}\n >\n <IconButton\n icon='ph--arrow-square-out--regular'\n iconOnly\n label={t('settings.tracing-panel.label')}\n onClick={handleOpenTracingPanel}\n />\n </SettingsForm.Item>\n <SettingsForm.Item\n title={t('settings.download-diagnostics.label')}\n description={t('settings.download-diagnostics.description')}\n >\n <IconButton\n icon='ph--download-simple--regular'\n iconOnly\n label={t('settings.download-diagnostics.label')}\n onClick={handleDownload}\n />\n </SettingsForm.Item>\n <SettingsForm.Item\n title={t('settings.download-logs.label')}\n description={t('settings.download-logs.description')}\n >\n <IconButton\n icon='ph--download-simple--regular'\n iconOnly\n label={t('settings.download-logs.label')}\n onClick={handleDownloadLogs}\n />\n </SettingsForm.Item>\n <SettingsForm.Item title={t('settings.repair.label')} description={t('settings.repair.description')}>\n <IconButton\n icon='ph--first-aid-kit--regular'\n iconOnly\n label={t('settings.repair.label')}\n onClick={handleRepair}\n />\n </SettingsForm.Item>\n\n {/* TODO(burdon): Move to layout? */}\n {toast && (\n <Toast.Root>\n <Toast.Body>\n <Toast.Title>\n <Icon icon='ph--gift--duotone' classNames='inline mr-1' />\n <span>{toast.title}</span>\n </Toast.Title>\n {toast.description && <Toast.Description>{toast.description}</Toast.Description>}\n </Toast.Body>\n </Toast.Root>\n )}\n\n <SettingsForm.Item\n title={t('settings.choose-storage-adaptor.label')}\n description={t('settings.choose-storage-adaptor.description')}\n >\n <Select.Root\n disabled={!onSettingsChange}\n value={\n Object.entries(StorageAdapters).find(\n ([_name, value]) => value === storageConfig?.runtime?.client?.storage?.dataStore,\n )?.[0]\n }\n onValueChange={handleStorageAdapterChange}\n >\n <Select.TriggerButton disabled={!onSettingsChange} placeholder={t('settings.data-store.label')} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {Object.keys(StorageAdapters).map((key) => (\n <Select.Option key={key} value={key}>\n {t(`settings.storage-adaptor.${key}.label`)}\n </Select.Option>\n ))}\n </Select.Viewport>\n <Select.Arrow />\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </SettingsForm.Item>\n </SettingsForm.Section>\n </SettingsForm.Viewport>\n );\n};\n\nconst updateConfig = (config: ConfigProto, setConfig: (newConfig: ConfigProto) => void, path: string[], value: any) => {\n const storageConfigCopy = JSON.parse(JSON.stringify(config ?? {}));\n setDeep(storageConfigCopy, path, value);\n setConfig(storageConfigCopy);\n queueMicrotask(async () => {\n await SaveConfig(storageConfigCopy);\n });\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,SAASC,aAAaC,WAAWC,SAASC,gBAAgB;AAEjE,SAA0BC,wBAAwB;AAElD,SAA2BC,YAAYC,SAASC,YAAY;AAC5D,SAASC,WAAW;AAEpB,SAASC,iBAAiB;AAC1B,SAASC,MAAMC,YAAYC,OAAOC,QAAQC,OAAOC,iBAAiBC,sBAAsB;AACxF,SAASC,YAAYC,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AAAA,CAAAA,CAAAA,CAAAA,CAAAA;;IAEtGrC,eAAQ6D,CAAAA,QAAAA,WAAyBxB,MAAAA,UAAAA;AACjCyB,QAAAA,oBAAUD,KAAAA,MAAAA,KAAAA,UAAAA,UAAAA,CAAAA,CAAAA,CAAAA;AACVE,UAAAA,mBAAe,MAAA,KAAA;YACP9E,iBAAW4E;AACnB,iBAAA,YAAA;AACF,UAAA,WAAA,iBAAA;;;",
6
+ "names": ["React", "useCallback", "useEffect", "useMemo", "useState", "getPersonalSpace", "SaveConfig", "Storage", "defs", "log", "useClient", "Icon", "IconButton", "Input", "Select", "Toast", "useFileDownload", "useTranslation", "Settings", "SettingsForm", "TRACE_ALL_KEY", "setDeep", "meta", "StorageAdapters", "idb", "Client", "DebugSettings", "settings", "onSettingsChange", "toast", "download", "storageConfig", "setStorageConfig", "client", "config", "handleToast", "setToast", "setTimeout", "clearTimeout", "Blob", "JSON", "stringify", "data", "undefined", "type", "fileName", "onUpload", "personalSpace", "error", "description", "title", "info", "t", "ndjson", "checked", "handleTraceAllChange", "localStorage", "String", "value", "handleStorageAdapterChange", "disabled", "wireframe", "onCheckedChange", "traceAll", "icon", "iconOnly", "label", "onClick", "handleOpenTracingPanel", "handleDownload", "handleDownloadLogs", "handleRepair", "classNames", "Object", "entries", "find", "_name", "onValueChange", "TriggerButton", "key", "updateConfig", "path", "storageConfigCopy", "setConfig", "queueMicrotask"]
7
+ }
@@ -0,0 +1,34 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx
4
+ import React, { useState } from "react";
5
+ import { ObjectsTree } from "@dxos/devtools";
6
+ import { Filter, Query } from "@dxos/echo";
7
+ import { useQuery } from "@dxos/react-client/echo";
8
+ import { Clipboard, Grid, Input, Panel, ScrollArea, Toolbar } from "@dxos/react-ui";
9
+ import { JsonHighlighter } from "@dxos/react-ui-syntax-highlighter";
10
+ var DebugSpaceObjectsPanel = ({ space }) => {
11
+ const [selectedId, setSelectedId] = useState(null);
12
+ const [selectedObject] = useQuery(space.db, selectedId ? Query.select(Filter.id(selectedId)) : Query.select(Filter.nothing()));
13
+ return /* @__PURE__ */ React.createElement(Clipboard.Provider, null, /* @__PURE__ */ React.createElement(Panel.Root, null, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
14
+ asChild: true
15
+ }, /* @__PURE__ */ React.createElement(Toolbar.Root, null, /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.TextInput, {
16
+ disabled: true,
17
+ placeholder: "Search..."
18
+ })))), /* @__PURE__ */ React.createElement(Panel.Content, {
19
+ asChild: true
20
+ }, /* @__PURE__ */ React.createElement(Grid, {
21
+ rows: 2,
22
+ classNames: "divide-y divide-separator"
23
+ }, /* @__PURE__ */ React.createElement(ScrollArea.Root, null, /* @__PURE__ */ React.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React.createElement(ObjectsTree, {
24
+ db: space.db,
25
+ onSelect: (entity) => setSelectedId(entity.id)
26
+ }))), selectedObject && /* @__PURE__ */ React.createElement(JsonHighlighter, {
27
+ classNames: "p-1",
28
+ data: selectedObject
29
+ })))));
30
+ };
31
+ export {
32
+ DebugSpaceObjectsPanel as default
33
+ };
34
+ //# sourceMappingURL=DebugSpaceObjectsPanel-NISULU6U.mjs.map