@dxos/plugin-debug 0.12.0-next-73daef452f1464b62efdbca75fb0067c1066f264 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (501) hide show
  1. package/PLUGIN.mdl +241 -3
  2. package/README.md +27 -3
  3. package/dist/lib/Debug.mjs.map +1 -1
  4. package/dist/lib/DebugNodes.mjs +21 -2
  5. package/dist/lib/DebugNodes.mjs.map +1 -1
  6. package/dist/lib/DebugOperation.mjs +166 -2
  7. package/dist/lib/DebugOperation.mjs.map +1 -1
  8. package/dist/lib/DebugPlugin.mjs.map +1 -1
  9. package/dist/lib/DebugSurface.mjs +7 -2
  10. package/dist/lib/DebugSurface.mjs.map +1 -1
  11. package/dist/lib/IncidentSpace.mjs +2 -0
  12. package/dist/lib/PipelineSpace.mjs +2 -0
  13. package/dist/lib/ReviewSpace.mjs +2 -0
  14. package/dist/lib/StockfishSpace.mjs +2 -0
  15. package/dist/lib/TidepoolSpace.mjs +2 -0
  16. package/dist/lib/WeatherSpace.mjs +2 -0
  17. package/dist/lib/WorkerSpace.mjs +2 -0
  18. package/dist/lib/capabilities.browser.mjs +71 -0
  19. package/dist/lib/capabilities.browser.mjs.map +1 -0
  20. package/dist/lib/capabilities.mjs +17 -7
  21. package/dist/lib/capabilities.mjs.map +1 -1
  22. package/dist/lib/capabilities.node.mjs +13 -3
  23. package/dist/lib/capabilities.node.mjs.map +1 -1
  24. package/dist/lib/capabilities.tauri.mjs +71 -0
  25. package/dist/lib/capabilities.tauri.mjs.map +1 -0
  26. package/dist/lib/capabilities.workerd.mjs +3 -1
  27. package/dist/lib/capabilities.workerd.mjs.map +1 -1
  28. package/dist/lib/chunk-DebugConsole.mjs +241 -0
  29. package/dist/lib/chunk-DebugConsole.mjs.map +1 -0
  30. package/dist/lib/chunk-DebugObjectPanel.mjs +12 -16
  31. package/dist/lib/chunk-DebugObjectPanel.mjs.map +1 -1
  32. package/dist/lib/chunk-DebugPanelDrawer.mjs +48 -0
  33. package/dist/lib/chunk-DebugPanelDrawer.mjs.map +1 -0
  34. package/dist/lib/chunk-DebugPanelHeader.mjs +280 -0
  35. package/dist/lib/chunk-DebugPanelHeader.mjs.map +1 -0
  36. package/dist/lib/chunk-DebugPanelStatus.mjs +127 -0
  37. package/dist/lib/chunk-DebugPanelStatus.mjs.map +1 -0
  38. package/dist/lib/chunk-DebugSettings.mjs +81 -70
  39. package/dist/lib/chunk-DebugSettings.mjs.map +1 -1
  40. package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs +21 -12
  41. package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs.map +1 -1
  42. package/dist/lib/chunk-DebugStatus.mjs +12 -12
  43. package/dist/lib/chunk-DebugStatus.mjs.map +1 -1
  44. package/dist/lib/chunk-IncidentSpace.mjs +269 -0
  45. package/dist/lib/chunk-IncidentSpace.mjs.map +1 -0
  46. package/dist/lib/chunk-LoggerPanel.mjs +18 -0
  47. package/dist/lib/chunk-LoggerPanel.mjs.map +1 -0
  48. package/dist/lib/chunk-PLUGIN.mjs +6 -0
  49. package/dist/lib/chunk-PLUGIN.mjs.map +1 -0
  50. package/dist/lib/chunk-PipelineSpace.mjs +378 -0
  51. package/dist/lib/chunk-PipelineSpace.mjs.map +1 -0
  52. package/dist/lib/chunk-ReviewSpace.mjs +356 -0
  53. package/dist/lib/chunk-ReviewSpace.mjs.map +1 -0
  54. package/dist/lib/chunk-SpaceGenerator.mjs +107 -73
  55. package/dist/lib/chunk-SpaceGenerator.mjs.map +1 -1
  56. package/dist/lib/chunk-StatsPanel.mjs +28 -35
  57. package/dist/lib/chunk-StatsPanel.mjs.map +1 -1
  58. package/dist/lib/chunk-StockfishSpace.mjs +563 -0
  59. package/dist/lib/chunk-StockfishSpace.mjs.map +1 -0
  60. package/dist/lib/chunk-TidepoolSpace.mjs +544 -0
  61. package/dist/lib/chunk-TidepoolSpace.mjs.map +1 -0
  62. package/dist/lib/chunk-WeatherSpace.mjs +206 -0
  63. package/dist/lib/chunk-WeatherSpace.mjs.map +1 -0
  64. package/dist/lib/chunk-Wireframe.mjs +6 -6
  65. package/dist/lib/chunk-Wireframe.mjs.map +1 -1
  66. package/dist/lib/chunk-WorkerSpace.mjs +177 -0
  67. package/dist/lib/chunk-WorkerSpace.mjs.map +1 -0
  68. package/dist/lib/chunk-app-graph-builder.mjs +72 -40
  69. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
  70. package/dist/lib/chunk-create-space-from-template.mjs +55 -0
  71. package/dist/lib/chunk-create-space-from-template.mjs.map +1 -0
  72. package/dist/lib/chunk-errors.mjs +13 -0
  73. package/dist/lib/chunk-errors.mjs.map +1 -0
  74. package/dist/lib/chunk-graph-retention.mjs +14 -0
  75. package/dist/lib/chunk-graph-retention.mjs.map +1 -0
  76. package/dist/lib/chunk-insert-lorem-ipsum.mjs +2 -2
  77. package/dist/lib/chunk-log-recording.mjs +29 -1
  78. package/dist/lib/chunk-log-recording.mjs.map +1 -1
  79. package/dist/lib/chunk-open-page.mjs +29 -0
  80. package/dist/lib/chunk-open-page.mjs.map +1 -0
  81. package/dist/lib/chunk-operation-handler.mjs +5 -0
  82. package/dist/lib/chunk-operation-handler.mjs.map +1 -1
  83. package/dist/lib/chunk-react-surface.mjs +73 -71
  84. package/dist/lib/chunk-react-surface.mjs.map +1 -1
  85. package/dist/lib/chunk-settings.mjs +2 -2
  86. package/dist/lib/chunk-settings.mjs.map +1 -1
  87. package/dist/lib/chunk-snapshot.mjs +170 -0
  88. package/dist/lib/chunk-snapshot.mjs.map +1 -0
  89. package/dist/lib/chunk-space-templates.mjs +21 -0
  90. package/dist/lib/chunk-space-templates.mjs.map +1 -0
  91. package/dist/lib/chunk-stats-panel.mjs +1 -1
  92. package/dist/lib/chunk-stats-panel.mjs.map +1 -1
  93. package/dist/lib/chunk-undo.mjs +17 -0
  94. package/dist/lib/chunk-undo.mjs.map +1 -0
  95. package/dist/lib/chunk-view-state.mjs +37 -0
  96. package/dist/lib/chunk-view-state.mjs.map +1 -0
  97. package/dist/lib/components.mjs +68 -28
  98. package/dist/lib/components.mjs.map +1 -1
  99. package/dist/lib/containers.mjs +5 -2
  100. package/dist/lib/containers.mjs.map +1 -1
  101. package/dist/lib/index.mjs +8 -2
  102. package/dist/lib/meta.mjs +3 -2
  103. package/dist/lib/meta.mjs.map +1 -1
  104. package/dist/lib/operations.mjs +7 -1
  105. package/dist/lib/operations.mjs.map +1 -1
  106. package/dist/lib/plugin.mjs +2 -2
  107. package/dist/lib/plugin.mjs.map +1 -1
  108. package/dist/lib/translations.mjs +13 -4
  109. package/dist/lib/translations.mjs.map +1 -1
  110. package/dist/types/scripts/build-template-archive.d.ts +2 -0
  111. package/dist/types/scripts/build-template-archive.d.ts.map +1 -0
  112. package/dist/types/src/DebugPlugin.d.ts +2 -2
  113. package/dist/types/src/DebugPlugin.d.ts.map +1 -1
  114. package/dist/types/src/capabilities/DebugSurfaces.d.ts +4 -5
  115. package/dist/types/src/capabilities/DebugSurfaces.d.ts.map +1 -1
  116. package/dist/types/src/capabilities/app-graph-builder.d.ts +31 -0
  117. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  118. package/dist/types/src/capabilities/app-graph-builder.test.d.ts +2 -0
  119. package/dist/types/src/capabilities/app-graph-builder.test.d.ts.map +1 -0
  120. package/dist/types/src/capabilities/gen/browser.d.ts +14 -0
  121. package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
  122. package/dist/types/src/capabilities/gen/node.d.ts +2 -0
  123. package/dist/types/src/capabilities/gen/node.d.ts.map +1 -1
  124. package/dist/types/src/capabilities/gen/tauri.d.ts +14 -0
  125. package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
  126. package/dist/types/src/capabilities/gen/workerd.d.ts +2 -0
  127. package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -1
  128. package/dist/types/src/capabilities/graph-retention.d.ts +5 -0
  129. package/dist/types/src/capabilities/graph-retention.d.ts.map +1 -0
  130. package/dist/types/src/capabilities/index.d.ts +2 -0
  131. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  132. package/dist/types/src/capabilities/log-recording.d.ts +4 -0
  133. package/dist/types/src/capabilities/log-recording.d.ts.map +1 -1
  134. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  135. package/dist/types/src/capabilities/space-templates.d.ts +14 -0
  136. package/dist/types/src/capabilities/space-templates.d.ts.map +1 -0
  137. package/dist/types/src/components/SchemaTable/SchemaTable.d.ts +4 -3
  138. package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -1
  139. package/dist/types/src/components/SchemaTable/index.d.ts +1 -1
  140. package/dist/types/src/components/SchemaTable/index.d.ts.map +1 -1
  141. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +2 -1
  142. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
  143. package/dist/types/src/components/SpaceGenerator/index.d.ts +2 -2
  144. package/dist/types/src/components/SpaceGenerator/index.d.ts.map +1 -1
  145. package/dist/types/src/components/SpaceGenerator/presets.d.ts +1 -1
  146. package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
  147. package/dist/types/src/components/index.d.ts +2 -2
  148. package/dist/types/src/components/index.d.ts.map +1 -1
  149. package/dist/types/src/containers/DebugConsole/DebugConsole.d.ts +12 -0
  150. package/dist/types/src/containers/DebugConsole/DebugConsole.d.ts.map +1 -0
  151. package/dist/types/src/containers/DebugConsole/DebugConsole.stories.d.ts +103 -0
  152. package/dist/types/src/containers/DebugConsole/DebugConsole.stories.d.ts.map +1 -0
  153. package/dist/types/src/containers/DebugConsole/cli.d.ts +24 -0
  154. package/dist/types/src/containers/DebugConsole/cli.d.ts.map +1 -0
  155. package/dist/types/src/containers/DebugConsole/index.d.ts +2 -0
  156. package/dist/types/src/containers/DebugConsole/index.d.ts.map +1 -0
  157. package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +1 -1
  158. package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -1
  159. package/dist/types/src/containers/DebugObjectPanel/index.d.ts +1 -1
  160. package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -1
  161. package/dist/types/src/containers/DebugPanel/DebugPanel.d.ts +30 -0
  162. package/dist/types/src/containers/DebugPanel/DebugPanel.d.ts.map +1 -0
  163. package/dist/types/src/containers/DebugPanel/DebugPanel.stories.d.ts +126 -0
  164. package/dist/types/src/containers/DebugPanel/DebugPanel.stories.d.ts.map +1 -0
  165. package/dist/types/src/containers/DebugPanel/DebugPanelContext.d.ts +16 -0
  166. package/dist/types/src/containers/DebugPanel/DebugPanelContext.d.ts.map +1 -0
  167. package/dist/types/src/containers/DebugPanel/DebugPanelHeader.d.ts +14 -0
  168. package/dist/types/src/containers/DebugPanel/DebugPanelHeader.d.ts.map +1 -0
  169. package/dist/types/src/containers/DebugPanel/DebugPanelMain.d.ts +6 -0
  170. package/dist/types/src/containers/DebugPanel/DebugPanelMain.d.ts.map +1 -0
  171. package/dist/types/src/containers/DebugPanel/DebugPanelSidebar.d.ts +6 -0
  172. package/dist/types/src/containers/DebugPanel/DebugPanelSidebar.d.ts.map +1 -0
  173. package/dist/types/src/containers/DebugPanel/index.d.ts +7 -0
  174. package/dist/types/src/containers/DebugPanel/index.d.ts.map +1 -0
  175. package/dist/types/src/containers/DebugPanel/view-state.d.ts +46 -0
  176. package/dist/types/src/containers/DebugPanel/view-state.d.ts.map +1 -0
  177. package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.d.ts +10 -0
  178. package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.d.ts.map +1 -0
  179. package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.stories.d.ts +114 -0
  180. package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.stories.d.ts.map +1 -0
  181. package/dist/types/src/containers/DebugPanelDrawer/index.d.ts +2 -0
  182. package/dist/types/src/containers/DebugPanelDrawer/index.d.ts.map +1 -0
  183. package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.d.ts +11 -0
  184. package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.d.ts.map +1 -0
  185. package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.stories.d.ts +107 -0
  186. package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.stories.d.ts.map +1 -0
  187. package/dist/types/src/containers/DebugPanelStatus/index.d.ts +2 -0
  188. package/dist/types/src/containers/DebugPanelStatus/index.d.ts.map +1 -0
  189. package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.d.ts.map +1 -1
  190. package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.stories.d.ts +13 -4
  191. package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.stories.d.ts.map +1 -1
  192. package/dist/types/src/containers/DebugPortSettings/index.d.ts +1 -1
  193. package/dist/types/src/containers/DebugPortSettings/index.d.ts.map +1 -1
  194. package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts +2 -2
  195. package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts.map +1 -1
  196. package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts +14 -5
  197. package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts.map +1 -1
  198. package/dist/types/src/containers/DebugSettings/index.d.ts +1 -1
  199. package/dist/types/src/containers/DebugSettings/index.d.ts.map +1 -1
  200. package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +1 -1
  201. package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -1
  202. package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +1 -1
  203. package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -1
  204. package/dist/types/src/containers/DebugStatus/index.d.ts +1 -1
  205. package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -1
  206. package/dist/types/src/containers/LoggerPanel/LoggerPanel.d.ts +6 -0
  207. package/dist/types/src/containers/LoggerPanel/LoggerPanel.d.ts.map +1 -0
  208. package/dist/types/src/containers/LoggerPanel/LoggerPanel.stories.d.ts +107 -0
  209. package/dist/types/src/containers/LoggerPanel/LoggerPanel.stories.d.ts.map +1 -0
  210. package/dist/types/src/containers/LoggerPanel/index.d.ts +2 -0
  211. package/dist/types/src/containers/LoggerPanel/index.d.ts.map +1 -0
  212. package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
  213. package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.stories.d.ts +13 -4
  214. package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.stories.d.ts.map +1 -1
  215. package/dist/types/src/containers/SpaceGenerator/index.d.ts +1 -1
  216. package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -1
  217. package/dist/types/src/containers/StatsPanel/StatsPanel.d.ts +5 -1
  218. package/dist/types/src/containers/StatsPanel/StatsPanel.d.ts.map +1 -1
  219. package/dist/types/src/containers/StatsPanel/index.d.ts +1 -1
  220. package/dist/types/src/containers/StatsPanel/index.d.ts.map +1 -1
  221. package/dist/types/src/containers/Wireframe/Wireframe.d.ts +2 -2
  222. package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -1
  223. package/dist/types/src/containers/Wireframe/index.d.ts +1 -1
  224. package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -1
  225. package/dist/types/src/containers/index.d.ts +7 -1
  226. package/dist/types/src/containers/index.d.ts.map +1 -1
  227. package/dist/types/src/errors.d.ts +123 -0
  228. package/dist/types/src/errors.d.ts.map +1 -0
  229. package/dist/types/src/index.d.ts +2 -2
  230. package/dist/types/src/index.d.ts.map +1 -1
  231. package/dist/types/src/operations/DebugOperationHandlerSet.d.ts.map +1 -1
  232. package/dist/types/src/operations/create-space-from-template.d.ts +5 -0
  233. package/dist/types/src/operations/create-space-from-template.d.ts.map +1 -0
  234. package/dist/types/src/operations/errors.d.ts +33 -0
  235. package/dist/types/src/operations/errors.d.ts.map +1 -0
  236. package/dist/types/src/operations/index.d.ts +1 -1
  237. package/dist/types/src/operations/index.d.ts.map +1 -1
  238. package/dist/types/src/operations/open-page.d.ts +5 -0
  239. package/dist/types/src/operations/open-page.d.ts.map +1 -0
  240. package/dist/types/src/operations/snapshot.d.ts +5 -0
  241. package/dist/types/src/operations/snapshot.d.ts.map +1 -0
  242. package/dist/types/src/operations/snapshot.test.d.ts +2 -0
  243. package/dist/types/src/operations/snapshot.test.d.ts.map +1 -0
  244. package/dist/types/src/operations/undo.d.ts +5 -0
  245. package/dist/types/src/operations/undo.d.ts.map +1 -0
  246. package/dist/types/src/operations/undo.test.d.ts +2 -0
  247. package/dist/types/src/operations/undo.test.d.ts.map +1 -0
  248. package/dist/types/src/plugin.d.ts.map +1 -1
  249. package/dist/types/src/samples/crm/PipelineSpace.d.ts +21 -0
  250. package/dist/types/src/samples/crm/PipelineSpace.d.ts.map +1 -0
  251. package/dist/types/src/samples/crm/PipelineSpace.test.d.ts +2 -0
  252. package/dist/types/src/samples/crm/PipelineSpace.test.d.ts.map +1 -0
  253. package/dist/types/src/samples/crm/accounts.d.ts +55 -0
  254. package/dist/types/src/samples/crm/accounts.d.ts.map +1 -0
  255. package/dist/types/src/samples/crm/inbox.d.ts +14 -0
  256. package/dist/types/src/samples/crm/inbox.d.ts.map +1 -0
  257. package/dist/types/src/samples/crm/pipeline.d.ts +9 -0
  258. package/dist/types/src/samples/crm/pipeline.d.ts.map +1 -0
  259. package/dist/types/src/samples/crm/util.d.ts +14 -0
  260. package/dist/types/src/samples/crm/util.d.ts.map +1 -0
  261. package/dist/types/src/samples/incident/IncidentSpace.d.ts +21 -0
  262. package/dist/types/src/samples/incident/IncidentSpace.d.ts.map +1 -0
  263. package/dist/types/src/samples/incident/IncidentSpace.test.d.ts +2 -0
  264. package/dist/types/src/samples/incident/IncidentSpace.test.d.ts.map +1 -0
  265. package/dist/types/src/samples/incident/docs.d.ts +14 -0
  266. package/dist/types/src/samples/incident/docs.d.ts.map +1 -0
  267. package/dist/types/src/samples/incident/project.d.ts +16 -0
  268. package/dist/types/src/samples/incident/project.d.ts.map +1 -0
  269. package/dist/types/src/samples/incident/tasks.d.ts +9 -0
  270. package/dist/types/src/samples/incident/tasks.d.ts.map +1 -0
  271. package/dist/types/src/samples/incident/util.d.ts +32 -0
  272. package/dist/types/src/samples/incident/util.d.ts.map +1 -0
  273. package/dist/types/src/samples/index.d.ts +8 -0
  274. package/dist/types/src/samples/index.d.ts.map +1 -0
  275. package/dist/types/src/samples/review/ReviewSpace.d.ts +19 -0
  276. package/dist/types/src/samples/review/ReviewSpace.d.ts.map +1 -0
  277. package/dist/types/src/samples/review/ReviewSpace.test.d.ts +2 -0
  278. package/dist/types/src/samples/review/ReviewSpace.test.d.ts.map +1 -0
  279. package/dist/types/src/samples/review/assets.d.ts +19 -0
  280. package/dist/types/src/samples/review/assets.d.ts.map +1 -0
  281. package/dist/types/src/samples/review/util.d.ts +4 -0
  282. package/dist/types/src/samples/review/util.d.ts.map +1 -0
  283. package/dist/types/src/samples/review/work.d.ts +15 -0
  284. package/dist/types/src/samples/review/work.d.ts.map +1 -0
  285. package/dist/types/src/samples/stockfish/StockfishSpace.d.ts +27 -0
  286. package/dist/types/src/samples/stockfish/StockfishSpace.d.ts.map +1 -0
  287. package/dist/types/src/samples/stockfish/StockfishSpace.test.d.ts +2 -0
  288. package/dist/types/src/samples/stockfish/StockfishSpace.test.d.ts.map +1 -0
  289. package/dist/types/src/samples/stockfish/docs.d.ts +8 -0
  290. package/dist/types/src/samples/stockfish/docs.d.ts.map +1 -0
  291. package/dist/types/src/samples/stockfish/game.d.ts +10 -0
  292. package/dist/types/src/samples/stockfish/game.d.ts.map +1 -0
  293. package/dist/types/src/samples/stockfish/project.d.ts +31 -0
  294. package/dist/types/src/samples/stockfish/project.d.ts.map +1 -0
  295. package/dist/types/src/samples/stockfish/run.test.d.ts +2 -0
  296. package/dist/types/src/samples/stockfish/run.test.d.ts.map +1 -0
  297. package/dist/types/src/samples/stockfish/skill.d.ts +8 -0
  298. package/dist/types/src/samples/stockfish/skill.d.ts.map +1 -0
  299. package/dist/types/src/samples/stockfish/tasks.d.ts +12 -0
  300. package/dist/types/src/samples/stockfish/tasks.d.ts.map +1 -0
  301. package/dist/types/src/samples/stockfish/util.d.ts +14 -0
  302. package/dist/types/src/samples/stockfish/util.d.ts.map +1 -0
  303. package/dist/types/src/samples/tidepool/TidepoolSpace.d.ts +22 -0
  304. package/dist/types/src/samples/tidepool/TidepoolSpace.d.ts.map +1 -0
  305. package/dist/types/src/samples/tidepool/TidepoolSpace.test.d.ts +2 -0
  306. package/dist/types/src/samples/tidepool/TidepoolSpace.test.d.ts.map +1 -0
  307. package/dist/types/src/samples/tidepool/docs.d.ts +12 -0
  308. package/dist/types/src/samples/tidepool/docs.d.ts.map +1 -0
  309. package/dist/types/src/samples/tidepool/project.d.ts +20 -0
  310. package/dist/types/src/samples/tidepool/project.d.ts.map +1 -0
  311. package/dist/types/src/samples/tidepool/tasks.d.ts +14 -0
  312. package/dist/types/src/samples/tidepool/tasks.d.ts.map +1 -0
  313. package/dist/types/src/samples/tidepool/team.d.ts +9 -0
  314. package/dist/types/src/samples/tidepool/team.d.ts.map +1 -0
  315. package/dist/types/src/samples/tidepool/util.d.ts +14 -0
  316. package/dist/types/src/samples/tidepool/util.d.ts.map +1 -0
  317. package/dist/types/src/samples/weather/WeatherSpace.d.ts +21 -0
  318. package/dist/types/src/samples/weather/WeatherSpace.d.ts.map +1 -0
  319. package/dist/types/src/samples/weather/WeatherSpace.test.d.ts +2 -0
  320. package/dist/types/src/samples/weather/WeatherSpace.test.d.ts.map +1 -0
  321. package/dist/types/src/samples/weather/project.d.ts +20 -0
  322. package/dist/types/src/samples/weather/project.d.ts.map +1 -0
  323. package/dist/types/src/samples/weather/skill.d.ts +12 -0
  324. package/dist/types/src/samples/weather/skill.d.ts.map +1 -0
  325. package/dist/types/src/samples/weather/tasks.d.ts +9 -0
  326. package/dist/types/src/samples/weather/tasks.d.ts.map +1 -0
  327. package/dist/types/src/samples/weather/util.d.ts +16 -0
  328. package/dist/types/src/samples/weather/util.d.ts.map +1 -0
  329. package/dist/types/src/samples/worker/WorkerSpace.d.ts +22 -0
  330. package/dist/types/src/samples/worker/WorkerSpace.d.ts.map +1 -0
  331. package/dist/types/src/samples/worker/WorkerSpace.test.d.ts +2 -0
  332. package/dist/types/src/samples/worker/WorkerSpace.test.d.ts.map +1 -0
  333. package/dist/types/src/samples/worker/project.d.ts +18 -0
  334. package/dist/types/src/samples/worker/project.d.ts.map +1 -0
  335. package/dist/types/src/samples/worker/tasks.d.ts +9 -0
  336. package/dist/types/src/samples/worker/tasks.d.ts.map +1 -0
  337. package/dist/types/src/samples/worker/util.d.ts +14 -0
  338. package/dist/types/src/samples/worker/util.d.ts.map +1 -0
  339. package/dist/types/src/stories/SpaceTemplates.stories.d.ts +114 -0
  340. package/dist/types/src/stories/SpaceTemplates.stories.d.ts.map +1 -0
  341. package/dist/types/src/testing/index.d.ts +3 -0
  342. package/dist/types/src/testing/index.d.ts.map +1 -0
  343. package/dist/types/src/testing/stub-drawer-plugin.d.ts +8 -0
  344. package/dist/types/src/testing/stub-drawer-plugin.d.ts.map +1 -0
  345. package/dist/types/src/testing/stub-tools-plugin.d.ts +19 -0
  346. package/dist/types/src/testing/stub-tools-plugin.d.ts.map +1 -0
  347. package/dist/types/src/translations.d.ts +13 -4
  348. package/dist/types/src/translations.d.ts.map +1 -1
  349. package/dist/types/src/types/Debug.d.ts +2 -2
  350. package/dist/types/src/types/Debug.d.ts.map +1 -1
  351. package/dist/types/src/types/DebugNodes.d.ts +13 -1
  352. package/dist/types/src/types/DebugNodes.d.ts.map +1 -1
  353. package/dist/types/src/types/DebugOperation.d.ts +119 -0
  354. package/dist/types/src/types/DebugOperation.d.ts.map +1 -1
  355. package/dist/types/src/types/DebugSurface.d.ts +7 -0
  356. package/dist/types/src/types/DebugSurface.d.ts.map +1 -1
  357. package/dist/types/src/types/index.d.ts +6 -6
  358. package/dist/types/src/types/index.d.ts.map +1 -1
  359. package/dist/types/tsconfig.tsbuildinfo +1 -1
  360. package/dx.config.ts +3 -2
  361. package/package.json +129 -73
  362. package/scripts/build-template-archive.ts +65 -0
  363. package/src/DebugPlugin.ts +1 -1
  364. package/src/capabilities/DebugSurfaces.tsx +85 -71
  365. package/src/capabilities/app-graph-builder.test.ts +45 -0
  366. package/src/capabilities/app-graph-builder.ts +83 -46
  367. package/src/capabilities/gen/browser.ts +85 -0
  368. package/src/capabilities/gen/node.ts +15 -8
  369. package/src/capabilities/gen/tauri.ts +85 -0
  370. package/src/capabilities/gen/workerd.ts +11 -4
  371. package/src/capabilities/graph-retention.ts +23 -0
  372. package/src/capabilities/index.ts +18 -10
  373. package/src/capabilities/log-recording.ts +20 -1
  374. package/src/capabilities/operation-handler.ts +9 -0
  375. package/src/capabilities/react-surface.ts +33 -29
  376. package/src/capabilities/settings.ts +2 -2
  377. package/src/capabilities/space-templates.ts +25 -0
  378. package/src/capabilities/stats-panel.ts +1 -1
  379. package/src/components/SchemaTable/SchemaTable.tsx +44 -10
  380. package/src/components/SchemaTable/index.ts +1 -1
  381. package/src/components/SpaceGenerator/ObjectGenerator.tsx +22 -2
  382. package/src/components/SpaceGenerator/index.ts +2 -2
  383. package/src/components/SpaceGenerator/presets.ts +4 -4
  384. package/src/components/index.ts +2 -2
  385. package/src/containers/DebugConsole/DebugConsole.stories.tsx +29 -0
  386. package/src/containers/DebugConsole/DebugConsole.tsx +94 -0
  387. package/src/containers/DebugConsole/cli.ts +296 -0
  388. package/src/containers/DebugConsole/index.ts +5 -0
  389. package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +44 -44
  390. package/src/containers/DebugObjectPanel/index.ts +1 -1
  391. package/src/containers/DebugPanel/DebugPanel.stories.tsx +118 -0
  392. package/src/containers/DebugPanel/DebugPanel.tsx +72 -0
  393. package/src/containers/DebugPanel/DebugPanelContext.ts +33 -0
  394. package/src/containers/DebugPanel/DebugPanelHeader.tsx +54 -0
  395. package/src/containers/DebugPanel/DebugPanelMain.tsx +116 -0
  396. package/src/containers/DebugPanel/DebugPanelSidebar.tsx +123 -0
  397. package/src/containers/DebugPanel/index.ts +10 -0
  398. package/src/containers/DebugPanel/view-state.ts +60 -0
  399. package/src/containers/DebugPanelDrawer/DebugPanelDrawer.stories.tsx +92 -0
  400. package/src/containers/DebugPanelDrawer/DebugPanelDrawer.tsx +72 -0
  401. package/src/containers/DebugPanelDrawer/index.ts +5 -0
  402. package/src/containers/DebugPanelStatus/DebugPanelStatus.stories.tsx +119 -0
  403. package/src/containers/DebugPanelStatus/DebugPanelStatus.tsx +167 -0
  404. package/src/containers/DebugPanelStatus/index.ts +5 -0
  405. package/src/containers/DebugPortSettings/DebugPortSettings.stories.tsx +2 -2
  406. package/src/containers/DebugPortSettings/DebugPortSettings.tsx +33 -40
  407. package/src/containers/DebugPortSettings/index.ts +1 -1
  408. package/src/containers/DebugSettings/DebugSettings.stories.tsx +1 -1
  409. package/src/containers/DebugSettings/DebugSettings.tsx +71 -64
  410. package/src/containers/DebugSettings/index.ts +1 -1
  411. package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +39 -28
  412. package/src/containers/DebugSpaceObjectsPanel/index.ts +1 -1
  413. package/src/containers/DebugStatus/DebugStatus.tsx +10 -10
  414. package/src/containers/DebugStatus/index.ts +1 -1
  415. package/src/containers/LoggerPanel/LoggerPanel.stories.tsx +62 -0
  416. package/src/containers/LoggerPanel/LoggerPanel.tsx +28 -0
  417. package/src/containers/LoggerPanel/index.ts +5 -0
  418. package/src/containers/SpaceGenerator/SpaceGenerator.stories.tsx +8 -8
  419. package/src/containers/SpaceGenerator/SpaceGenerator.tsx +102 -73
  420. package/src/containers/SpaceGenerator/index.ts +1 -1
  421. package/src/containers/StatsPanel/StatsPanel.tsx +32 -31
  422. package/src/containers/StatsPanel/index.ts +1 -1
  423. package/src/containers/Wireframe/Wireframe.tsx +8 -7
  424. package/src/containers/Wireframe/index.ts +1 -1
  425. package/src/containers/index.ts +22 -9
  426. package/src/errors.ts +23 -0
  427. package/src/index.ts +2 -2
  428. package/src/meta.ts +1 -1
  429. package/src/operations/DebugOperationHandlerSet.ts +5 -1
  430. package/src/operations/create-space-from-template.ts +57 -0
  431. package/src/operations/errors.ts +8 -0
  432. package/src/operations/index.ts +1 -1
  433. package/src/operations/open-page.ts +51 -0
  434. package/src/operations/snapshot.test.ts +57 -0
  435. package/src/operations/snapshot.ts +243 -0
  436. package/src/operations/undo.test.ts +19 -0
  437. package/src/operations/undo.ts +28 -0
  438. package/src/plugin.tsx +4 -0
  439. package/src/samples/crm/PipelineSpace.test.ts +55 -0
  440. package/src/samples/crm/PipelineSpace.ts +52 -0
  441. package/src/samples/crm/accounts.ts +153 -0
  442. package/src/samples/crm/inbox.ts +158 -0
  443. package/src/samples/crm/pipeline.ts +70 -0
  444. package/src/samples/crm/util.ts +18 -0
  445. package/src/samples/incident/IncidentSpace.test.ts +68 -0
  446. package/src/samples/incident/IncidentSpace.ts +61 -0
  447. package/src/samples/incident/docs.ts +111 -0
  448. package/src/samples/incident/project.ts +61 -0
  449. package/src/samples/incident/tasks.ts +101 -0
  450. package/src/samples/incident/util.ts +24 -0
  451. package/src/samples/index.ts +11 -0
  452. package/src/samples/review/ReviewSpace.test.ts +89 -0
  453. package/src/samples/review/ReviewSpace.ts +47 -0
  454. package/src/samples/review/assets.ts +123 -0
  455. package/src/samples/review/util.ts +10 -0
  456. package/src/samples/review/work.ts +249 -0
  457. package/src/samples/stockfish/StockfishSpace.test.ts +129 -0
  458. package/src/samples/stockfish/StockfishSpace.ts +70 -0
  459. package/src/samples/stockfish/docs.ts +65 -0
  460. package/src/samples/stockfish/game.ts +47 -0
  461. package/src/samples/stockfish/project.ts +87 -0
  462. package/src/samples/stockfish/run.test.ts +193 -0
  463. package/src/samples/stockfish/skill.ts +154 -0
  464. package/src/samples/stockfish/tasks.ts +306 -0
  465. package/src/samples/stockfish/util.ts +17 -0
  466. package/src/samples/tidepool/TidepoolSpace.test.ts +61 -0
  467. package/src/samples/tidepool/TidepoolSpace.ts +65 -0
  468. package/src/samples/tidepool/docs.ts +140 -0
  469. package/src/samples/tidepool/project.ts +57 -0
  470. package/src/samples/tidepool/tasks.ts +252 -0
  471. package/src/samples/tidepool/team.ts +87 -0
  472. package/src/samples/tidepool/util.ts +18 -0
  473. package/src/samples/weather/WeatherSpace.test.ts +93 -0
  474. package/src/samples/weather/WeatherSpace.ts +59 -0
  475. package/src/samples/weather/project.ts +76 -0
  476. package/src/samples/weather/skill.ts +45 -0
  477. package/src/samples/weather/tasks.ts +98 -0
  478. package/src/samples/weather/util.ts +21 -0
  479. package/src/samples/worker/WorkerSpace.test.ts +102 -0
  480. package/src/samples/worker/WorkerSpace.ts +56 -0
  481. package/src/samples/worker/project.ts +72 -0
  482. package/src/samples/worker/tasks.ts +119 -0
  483. package/src/samples/worker/util.ts +17 -0
  484. package/src/stories/SpaceTemplates.stories.tsx +105 -0
  485. package/src/testing/index.ts +6 -0
  486. package/src/testing/stub-drawer-plugin.ts +65 -0
  487. package/src/testing/stub-tools-plugin.tsx +95 -0
  488. package/src/translations.ts +15 -6
  489. package/src/types/Debug.ts +2 -2
  490. package/src/types/DebugNodes.ts +21 -1
  491. package/src/types/DebugOperation.ts +206 -0
  492. package/src/types/DebugSurface.ts +7 -0
  493. package/src/types/index.ts +6 -6
  494. package/dist/lib/chunk-LogStatus.mjs +0 -44
  495. package/dist/lib/chunk-LogStatus.mjs.map +0 -1
  496. package/dist/types/src/containers/LogStatus/LogStatus.d.ts +0 -6
  497. package/dist/types/src/containers/LogStatus/LogStatus.d.ts.map +0 -1
  498. package/dist/types/src/containers/LogStatus/index.d.ts +0 -2
  499. package/dist/types/src/containers/LogStatus/index.d.ts.map +0 -1
  500. package/src/containers/LogStatus/LogStatus.tsx +0 -51
  501. package/src/containers/LogStatus/index.ts +0 -5
@@ -0,0 +1,356 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import * as Effect from "effect/Effect";
3
+ import * as SampleSpace from "@dxos/app-toolkit/SampleSpace";
4
+ import { Blob, Database, Ref } from "@dxos/echo";
5
+ import * as Project from "@dxos/compute/Project";
6
+ import { File, Outline, Person, PullRequest, Repo, Task, TaskSet, Video } from "@dxos/types";
7
+ import { log } from "@dxos/log";
8
+ //#region src/samples/review/assets.ts
9
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-debug/src/samples/review/assets.ts";
10
+ /** Fetches over HTTP, treating any failure as unavailable so an offline apply still produces the space. */
11
+ var fetchAsset = async (url) => {
12
+ try {
13
+ const response = await fetch(url);
14
+ if (!response.ok) {
15
+ log.warn("sample asset unavailable", {
16
+ url,
17
+ status: response.status
18
+ }, {
19
+ "~LogMeta": "~LogMeta",
20
+ F: __dxlog_file,
21
+ L: 26,
22
+ S: void 0
23
+ });
24
+ return;
25
+ }
26
+ return new Uint8Array(await response.arrayBuffer());
27
+ } catch (error) {
28
+ log.warn("sample asset unavailable", {
29
+ url,
30
+ error
31
+ }, {
32
+ "~LogMeta": "~LogMeta",
33
+ F: __dxlog_file,
34
+ L: 31,
35
+ S: void 0
36
+ });
37
+ return;
38
+ }
39
+ };
40
+ var R2 = "https://pub-39066a86073446d7b77b1c157b660bb5.r2.dev/demos";
41
+ var IMAGE_SEEDS = [
42
+ {
43
+ key: "railBefore",
44
+ name: "l0-rail-before.png",
45
+ url: "https://raw.githubusercontent.com/dxos/dxos/97e185d31046b60ee0e130bdc86553de98f356f8/.pr-assets/l0-before.png"
46
+ },
47
+ {
48
+ key: "railAfter",
49
+ name: "l0-rail-after.png",
50
+ url: "https://raw.githubusercontent.com/dxos/dxos/97e185d31046b60ee0e130bdc86553de98f356f8/.pr-assets/l0-after.png"
51
+ },
52
+ {
53
+ key: "oauthIdle",
54
+ name: "oauth-idle.png",
55
+ url: "https://raw.githubusercontent.com/dxos/dxos/f186f44ee72b4c4b7508b4f3f6a97f3957704c84/packages/plugins/plugin-onboarding/assets/oauth-idle.png"
56
+ },
57
+ {
58
+ key: "oauthPending",
59
+ name: "oauth-pending.png",
60
+ url: "https://raw.githubusercontent.com/dxos/dxos/f186f44ee72b4c4b7508b4f3f6a97f3957704c84/packages/plugins/plugin-onboarding/assets/oauth-pending.png"
61
+ }
62
+ ];
63
+ var VIDEO_SEEDS = [
64
+ {
65
+ key: "toastCountdown",
66
+ name: "Toast countdown demo",
67
+ url: `${R2}/2026-09-04-toast-countdown/toast-countdown.webm`,
68
+ description: "A toast counting down its remaining time in a bar, pausing on hover (dxos/dxos#12954)."
69
+ },
70
+ {
71
+ key: "haloLogin",
72
+ name: "Switch identity in place — login",
73
+ url: `${R2}/2026-09-23-halo-in-place-identity/halo-login.webm`,
74
+ description: "Logging in to another identity without a reset and reload (dxos/dxos#13336)."
75
+ },
76
+ {
77
+ key: "archify",
78
+ name: "Archify diagrams demo",
79
+ url: `${R2}/2026-09-04-plugin-archify/archify-final.webm`,
80
+ description: "Generating an architecture diagram of a package with Archify (dxos/dxos#12952)."
81
+ }
82
+ ];
83
+ /**
84
+ * Images become `File`s whose blob holds the bytes inline, which every client can render without a
85
+ * storage backend. An image the loader cannot reach keeps its source URL as an external blob, so the
86
+ * space is still complete and the file says where it came from.
87
+ */
88
+ var makeMedia = (loadAsset) => SampleSpace.phase("media", {
89
+ schemas: [
90
+ File.File,
91
+ Blob.Blob,
92
+ Video.Video
93
+ ],
94
+ run: () => Effect.gen(function* () {
95
+ return {
96
+ images: yield* SampleSpace.seed(IMAGE_SEEDS, (seed) => Effect.gen(function* () {
97
+ const bytes = yield* Effect.promise(() => loadAsset(seed.url));
98
+ const blob = yield* Database.add(Blob.make({
99
+ type: "image/png",
100
+ size: bytes?.byteLength ?? 0,
101
+ data: bytes ? Blob.inlineData(bytes) : Blob.externalData(seed.url)
102
+ }));
103
+ return yield* Database.add(File.make({
104
+ name: seed.name,
105
+ data: Ref.make(blob)
106
+ }));
107
+ })),
108
+ videos: yield* SampleSpace.seed(VIDEO_SEEDS, (seed) => Database.add(Video.make({
109
+ name: seed.name,
110
+ url: seed.url,
111
+ description: seed.description
112
+ })))
113
+ };
114
+ })
115
+ });
116
+ //#endregion
117
+ //#region src/samples/review/util.ts
118
+ /** Stable reference date so regenerations are reproducible. */
119
+ var REFERENCE = /* @__PURE__ */ new Date("2026-09-24T15:00:00Z");
120
+ var { daysAgo } = SampleSpace.makeClock(REFERENCE);
121
+ //#endregion
122
+ //#region src/samples/review/work.ts
123
+ var PULL_REQUEST_SEEDS = [
124
+ {
125
+ key: "rail",
126
+ number: 12544,
127
+ title: "plugin-navtree: stop the L0 rail insetting items by the scrollbar strip",
128
+ state: "merged",
129
+ author: "wittjosiah",
130
+ headBranch: "claude/l0-box-centering-regression-lg55l7",
131
+ additions: 65,
132
+ deletions: 4
133
+ },
134
+ {
135
+ key: "oauth",
136
+ number: 12690,
137
+ title: "onboarding, connector: run desktop OAuth in the system browser",
138
+ state: "merged",
139
+ author: "wittjosiah",
140
+ headBranch: "claude/tauri-oauth-login-ftwie0",
141
+ additions: 941,
142
+ deletions: 206
143
+ },
144
+ {
145
+ key: "toast",
146
+ number: 12954,
147
+ title: "react-ui: count down a toast's remaining time in a bar",
148
+ state: "merged",
149
+ author: "wittjosiah",
150
+ headBranch: "claude/toast-progress-indicator-e3a046",
151
+ additions: 137,
152
+ deletions: 30
153
+ },
154
+ {
155
+ key: "halo",
156
+ number: 13336,
157
+ title: "halo: switch identities in place with deleteIdentity instead of a reset and reload",
158
+ state: "open",
159
+ author: "dmaretskyi",
160
+ headBranch: "dm/admiring-gauss-nqdcuk",
161
+ additions: 501,
162
+ deletions: 159
163
+ },
164
+ {
165
+ key: "archify",
166
+ number: 12952,
167
+ title: "plugin-archify: add Archify architecture diagrams",
168
+ state: "open",
169
+ author: "dmaretskyi",
170
+ headBranch: "claude/archify-composer-plugin-5rfrpr",
171
+ additions: 3176,
172
+ deletions: 0
173
+ }
174
+ ];
175
+ var REVIEWER_SEEDS = [{
176
+ key: "mira",
177
+ fullName: "Mira Okafor",
178
+ jobTitle: "Design engineer"
179
+ }, {
180
+ key: "kai",
181
+ fullName: "Kai Lindqvist",
182
+ jobTitle: "Platform engineer"
183
+ }];
184
+ var TASK_SEEDS = [
185
+ {
186
+ title: "Stop the L0 rail insetting items by the scrollbar strip",
187
+ status: "done",
188
+ priority: "medium",
189
+ description: "The current-workspace indicator is tucked under the avatar since the overlay scrollbar landed.",
190
+ pullRequest: "rail",
191
+ images: ["railBefore", "railAfter"],
192
+ opened: 30
193
+ },
194
+ {
195
+ title: "Run desktop OAuth in the system browser",
196
+ status: "done",
197
+ priority: "urgent",
198
+ description: "Every OAuth flow in the desktop app fails before the provider page appears: WKWebView opens no window.",
199
+ pullRequest: "oauth",
200
+ images: ["oauthIdle", "oauthPending"],
201
+ opened: 24
202
+ },
203
+ {
204
+ title: "Count down a toast's remaining time",
205
+ status: "done",
206
+ priority: "low",
207
+ description: "A toast disappears with no warning; show the time it has left and pause it on hover.",
208
+ pullRequest: "toast",
209
+ videos: ["toastCountdown"],
210
+ opened: 18
211
+ },
212
+ {
213
+ title: "Switch identities in place instead of a reset and reload",
214
+ status: "review",
215
+ priority: "high",
216
+ description: "Logging out, recovering or joining another identity wipes the profile and reloads the app.",
217
+ pullRequest: "halo",
218
+ videos: ["haloLogin"],
219
+ reviewers: ["kai"],
220
+ opened: 6
221
+ },
222
+ {
223
+ title: "Add Archify architecture diagrams",
224
+ status: "review",
225
+ priority: "medium",
226
+ description: "Render a package’s module graph as a diagram an agent can generate and a person can read.",
227
+ pullRequest: "archify",
228
+ videos: ["archify"],
229
+ reviewers: ["mira", "kai"],
230
+ opened: 12
231
+ },
232
+ {
233
+ title: "Show a pull request's review state on its task pill",
234
+ status: "started",
235
+ priority: "medium",
236
+ description: "The pill colours by open/merged/closed; approved and changes-requested are invisible.",
237
+ opened: 2
238
+ },
239
+ {
240
+ title: "Record a demo for every task in review",
241
+ status: "todo",
242
+ priority: "low",
243
+ description: "A reviewer should be able to watch the change before reading the diff.",
244
+ opened: 1
245
+ }
246
+ ];
247
+ /** Pull requests, reviewers, the task set, and the project that gathers them with the media. */
248
+ var Work = SampleSpace.phase("work", {
249
+ schemas: [
250
+ PullRequest.PullRequest,
251
+ Person.Person,
252
+ Task.Task,
253
+ TaskSet.TaskSet,
254
+ Outline.Outline,
255
+ Repo.Repo,
256
+ Project.Project
257
+ ],
258
+ run: ({ images, videos }) => Effect.gen(function* () {
259
+ const pullRequests = yield* SampleSpace.seed(PULL_REQUEST_SEEDS, ({ key: _key, ...seed }) => Database.add(PullRequest.make({
260
+ ...seed,
261
+ owner: "dxos",
262
+ repo: "dxos",
263
+ url: `https://github.com/dxos/dxos/pull/${seed.number}`,
264
+ baseBranch: "main"
265
+ })));
266
+ const reviewers = yield* SampleSpace.seed(REVIEWER_SEEDS, ({ key: _key, ...seed }) => Database.add(Person.make(seed)));
267
+ const tasks = TASK_SEEDS.map((seed) => Task.make({
268
+ title: seed.title,
269
+ description: seed.description,
270
+ status: seed.status,
271
+ priority: seed.priority,
272
+ reviewers: seed.reviewers?.map((key) => ({ contact: Ref.make(reviewers[key]) })),
273
+ artifacts: [
274
+ ...seed.pullRequest ? [Ref.make(pullRequests[seed.pullRequest])] : [],
275
+ ...(seed.images ?? []).map((key) => Ref.make(images[key])),
276
+ ...(seed.videos ?? []).map((key) => Ref.make(videos[key]))
277
+ ],
278
+ history: [{
279
+ date: daysAgo(seed.opened),
280
+ event: "created",
281
+ description: "Opened."
282
+ }]
283
+ }));
284
+ const taskSet = yield* Database.add(TaskSet.make({ name: "Composer polish" }));
285
+ yield* SampleSpace.children(taskSet, tasks, (taskSet, refs) => {
286
+ taskSet.tasks = refs;
287
+ });
288
+ const repo = yield* Database.add(Repo.make({
289
+ name: "dxos",
290
+ owner: "dxos",
291
+ url: "https://github.com/dxos/dxos",
292
+ description: "TypeScript implementation of the DXOS protocols, SDK, toolchain and Composer.",
293
+ defaultBranch: "main"
294
+ }));
295
+ const outline = yield* Database.add(Outline.make({ name: "Review notes" }));
296
+ return {
297
+ project: yield* Database.add(Project.make({
298
+ name: "Composer polish",
299
+ description: "Small, visible fixes to Composer, each landed as a reviewed pull request with a demo.",
300
+ status: "active",
301
+ repo: Ref.make(repo),
302
+ taskSet: Ref.make(taskSet),
303
+ outline: Ref.make(outline),
304
+ artifacts: [
305
+ ...Object.values(pullRequests).map((pullRequest) => Ref.make(pullRequest)),
306
+ ...Object.values(images).map((image) => Ref.make(image)),
307
+ ...Object.values(videos).map((video) => Ref.make(video))
308
+ ]
309
+ })),
310
+ taskSet,
311
+ tasks,
312
+ pullRequests
313
+ };
314
+ })
315
+ });
316
+ //#endregion
317
+ //#region src/samples/review/ReviewSpace.ts
318
+ var ReviewSpace_exports = /* @__PURE__ */ __exportAll({
319
+ TEMPLATE_ID: () => TEMPLATE_ID,
320
+ make: () => make,
321
+ makeTemplate: () => makeTemplate
322
+ });
323
+ var TEMPLATE_ID = "org.dxos.plugin-debug.template.review";
324
+ /**
325
+ * A review queue: one project whose finished tasks carry the merged dxos/dxos pull requests that
326
+ * delivered them, with the screenshots and demo recordings attached to those PRs, and whose tasks in
327
+ * review carry the PRs still open.
328
+ */
329
+ var make = ({ loadAsset = fetchAsset } = {}) => {
330
+ const phases = {
331
+ media: makeMedia(loadAsset),
332
+ work: Work
333
+ };
334
+ return SampleSpace.make({
335
+ space: {
336
+ name: "Composer — Review queue",
337
+ icon: "medal-military",
338
+ hue: "green"
339
+ },
340
+ reference: REFERENCE,
341
+ phases,
342
+ build: (phases) => Effect.gen(function* () {
343
+ const media = yield* phases.media();
344
+ return yield* phases.work(media);
345
+ })
346
+ });
347
+ };
348
+ var makeTemplate = (options) => SampleSpace.makeTemplate({
349
+ id: TEMPLATE_ID,
350
+ description: "A project with tasks carrying real dxos pull requests, their screenshots and demo videos.",
351
+ definition: make(options)
352
+ });
353
+ //#endregion
354
+ export { makeTemplate as i, TEMPLATE_ID as n, make as r, ReviewSpace_exports as t };
355
+
356
+ //# sourceMappingURL=chunk-ReviewSpace.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-ReviewSpace.mjs","names":[],"sources":["../../src/samples/review/assets.ts","../../src/samples/review/util.ts","../../src/samples/review/work.ts","../../src/samples/review/ReviewSpace.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport { Blob, Database, Ref } from '@dxos/echo';\nimport { log } from '@dxos/log';\nimport { File, Video } from '@dxos/types';\n\n//\n// Media procured from dxos/dxos pull requests: the screenshots and demo recordings their authors\n// linked from the PR body. Screenshots are SHA-pinned `raw.githubusercontent.com` URLs, so they\n// survive the source branch being deleted and are served with `Access-Control-Allow-Origin: *`.\n//\n\n/** Resolves a URL to its bytes; `undefined` when unreachable. Injected so a headless build needs no network. */\nexport type AssetLoader = (url: string) => Promise<Uint8Array | undefined>;\n\n/** Fetches over HTTP, treating any failure as unavailable so an offline apply still produces the space. */\nexport const fetchAsset: AssetLoader = async (url) => {\n try {\n const response = await fetch(url);\n if (!response.ok) {\n log.warn('sample asset unavailable', { url, status: response.status });\n return undefined;\n }\n return new Uint8Array(await response.arrayBuffer());\n } catch (error) {\n log.warn('sample asset unavailable', { url, error });\n return undefined;\n }\n};\n\nconst R2 = 'https://pub-39066a86073446d7b77b1c157b660bb5.r2.dev/demos';\n\nexport type ImageKey = 'railBefore' | 'railAfter' | 'oauthIdle' | 'oauthPending';\n\nconst IMAGE_SEEDS: ReadonlyArray<SampleSpace.Seed<ImageKey, { name: string; url: string }>> = [\n {\n key: 'railBefore',\n name: 'l0-rail-before.png',\n url: 'https://raw.githubusercontent.com/dxos/dxos/97e185d31046b60ee0e130bdc86553de98f356f8/.pr-assets/l0-before.png',\n },\n {\n key: 'railAfter',\n name: 'l0-rail-after.png',\n url: 'https://raw.githubusercontent.com/dxos/dxos/97e185d31046b60ee0e130bdc86553de98f356f8/.pr-assets/l0-after.png',\n },\n {\n key: 'oauthIdle',\n name: 'oauth-idle.png',\n url: 'https://raw.githubusercontent.com/dxos/dxos/f186f44ee72b4c4b7508b4f3f6a97f3957704c84/packages/plugins/plugin-onboarding/assets/oauth-idle.png',\n },\n {\n key: 'oauthPending',\n name: 'oauth-pending.png',\n url: 'https://raw.githubusercontent.com/dxos/dxos/f186f44ee72b4c4b7508b4f3f6a97f3957704c84/packages/plugins/plugin-onboarding/assets/oauth-pending.png',\n },\n];\n\nexport type VideoKey = 'toastCountdown' | 'haloLogin' | 'archify';\n\n// Recordings stay URL-based `Video` objects: the R2 bucket sends no CORS header, so the bytes cannot\n// be read into a blob from the browser, while the player embeds the URL directly.\nconst VIDEO_SEEDS: ReadonlyArray<SampleSpace.Seed<VideoKey, { name: string; url: string; description: string }>> = [\n {\n key: 'toastCountdown',\n name: 'Toast countdown demo',\n url: `${R2}/2026-09-04-toast-countdown/toast-countdown.webm`,\n description: 'A toast counting down its remaining time in a bar, pausing on hover (dxos/dxos#12954).',\n },\n {\n key: 'haloLogin',\n name: 'Switch identity in place — login',\n url: `${R2}/2026-09-23-halo-in-place-identity/halo-login.webm`,\n description: 'Logging in to another identity without a reset and reload (dxos/dxos#13336).',\n },\n {\n key: 'archify',\n name: 'Archify diagrams demo',\n url: `${R2}/2026-09-04-plugin-archify/archify-final.webm`,\n description: 'Generating an architecture diagram of a package with Archify (dxos/dxos#12952).',\n },\n];\n\nexport type MediaResult = {\n images: Record<ImageKey, File.File>;\n videos: Record<VideoKey, Video.Video>;\n};\n\n/**\n * Images become `File`s whose blob holds the bytes inline, which every client can render without a\n * storage backend. An image the loader cannot reach keeps its source URL as an external blob, so the\n * space is still complete and the file says where it came from.\n */\nexport const makeMedia = (loadAsset: AssetLoader): SampleSpace.Phase<MediaResult> =>\n SampleSpace.phase('media', {\n schemas: [File.File, Blob.Blob, Video.Video],\n run: () =>\n Effect.gen(function* () {\n const images = yield* SampleSpace.seed(IMAGE_SEEDS, (seed) =>\n Effect.gen(function* () {\n const bytes = yield* Effect.promise(() => loadAsset(seed.url));\n const blob = yield* Database.add(\n Blob.make({\n type: 'image/png',\n size: bytes?.byteLength ?? 0,\n data: bytes ? Blob.inlineData(bytes) : Blob.externalData(seed.url),\n }),\n );\n return yield* Database.add(File.make({ name: seed.name, data: Ref.make(blob) }));\n }),\n );\n\n const videos = yield* SampleSpace.seed(VIDEO_SEEDS, (seed) =>\n Database.add(Video.make({ name: seed.name, url: seed.url, description: seed.description })),\n );\n\n return { images, videos };\n }),\n });\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\n\n/** Stable reference date so regenerations are reproducible. */\nexport const REFERENCE = new Date('2026-09-24T15:00:00Z');\n\nexport const { daysAgo } = SampleSpace.makeClock(REFERENCE);\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport * as Project from '@dxos/compute/Project';\nimport { Database, type Obj, Ref } from '@dxos/echo';\nimport { Outline, Person, PullRequest, Repo, Task, TaskSet } from '@dxos/types';\n\nimport { type ImageKey, type MediaResult, type VideoKey } from './assets.ts';\nimport { daysAgo } from './util.ts';\n\n//\n// The review queue: real dxos/dxos pull requests, each filed against the task it delivered, with the\n// screenshots and recordings its author attached. Finished work carries merged PRs; the tasks in\n// review carry the PRs still open, which is what a reviewer opens the space to work through.\n//\n\ntype PullRequestKey = 'rail' | 'oauth' | 'toast' | 'halo' | 'archify';\n\nconst PULL_REQUEST_SEEDS: ReadonlyArray<\n SampleSpace.Seed<PullRequestKey, Omit<Obj.MakeProps<typeof PullRequest.PullRequest>, 'owner' | 'repo'>>\n> = [\n {\n key: 'rail',\n number: 12544,\n title: 'plugin-navtree: stop the L0 rail insetting items by the scrollbar strip',\n state: 'merged',\n author: 'wittjosiah',\n headBranch: 'claude/l0-box-centering-regression-lg55l7',\n additions: 65,\n deletions: 4,\n },\n {\n key: 'oauth',\n number: 12690,\n title: 'onboarding, connector: run desktop OAuth in the system browser',\n state: 'merged',\n author: 'wittjosiah',\n headBranch: 'claude/tauri-oauth-login-ftwie0',\n additions: 941,\n deletions: 206,\n },\n {\n key: 'toast',\n number: 12954,\n title: \"react-ui: count down a toast's remaining time in a bar\",\n state: 'merged',\n author: 'wittjosiah',\n headBranch: 'claude/toast-progress-indicator-e3a046',\n additions: 137,\n deletions: 30,\n },\n {\n key: 'halo',\n number: 13336,\n title: 'halo: switch identities in place with deleteIdentity instead of a reset and reload',\n state: 'open',\n author: 'dmaretskyi',\n headBranch: 'dm/admiring-gauss-nqdcuk',\n additions: 501,\n deletions: 159,\n },\n {\n key: 'archify',\n number: 12952,\n title: 'plugin-archify: add Archify architecture diagrams',\n state: 'open',\n author: 'dmaretskyi',\n headBranch: 'claude/archify-composer-plugin-5rfrpr',\n additions: 3176,\n deletions: 0,\n },\n];\n\ntype ReviewerKey = 'mira' | 'kai';\n\nconst REVIEWER_SEEDS: ReadonlyArray<SampleSpace.Seed<ReviewerKey, { fullName: string; jobTitle: string }>> = [\n { key: 'mira', fullName: 'Mira Okafor', jobTitle: 'Design engineer' },\n { key: 'kai', fullName: 'Kai Lindqvist', jobTitle: 'Platform engineer' },\n];\n\ntype TaskSeed = {\n readonly title: string;\n readonly status: Task.Status;\n readonly description: string;\n readonly priority?: Task.Priority;\n readonly pullRequest?: PullRequestKey;\n readonly images?: ReadonlyArray<ImageKey>;\n readonly videos?: ReadonlyArray<VideoKey>;\n readonly reviewers?: ReadonlyArray<ReviewerKey>;\n /** Days before the reference date the task was opened. */\n readonly opened: number;\n};\n\nconst TASK_SEEDS: ReadonlyArray<TaskSeed> = [\n {\n title: 'Stop the L0 rail insetting items by the scrollbar strip',\n status: 'done',\n priority: 'medium',\n description: 'The current-workspace indicator is tucked under the avatar since the overlay scrollbar landed.',\n pullRequest: 'rail',\n images: ['railBefore', 'railAfter'],\n opened: 30,\n },\n {\n title: 'Run desktop OAuth in the system browser',\n status: 'done',\n priority: 'urgent',\n description:\n 'Every OAuth flow in the desktop app fails before the provider page appears: WKWebView opens no window.',\n pullRequest: 'oauth',\n images: ['oauthIdle', 'oauthPending'],\n opened: 24,\n },\n {\n title: \"Count down a toast's remaining time\",\n status: 'done',\n priority: 'low',\n description: 'A toast disappears with no warning; show the time it has left and pause it on hover.',\n pullRequest: 'toast',\n videos: ['toastCountdown'],\n opened: 18,\n },\n {\n title: 'Switch identities in place instead of a reset and reload',\n status: 'review',\n priority: 'high',\n description: 'Logging out, recovering or joining another identity wipes the profile and reloads the app.',\n pullRequest: 'halo',\n videos: ['haloLogin'],\n reviewers: ['kai'],\n opened: 6,\n },\n {\n title: 'Add Archify architecture diagrams',\n status: 'review',\n priority: 'medium',\n description: 'Render a package’s module graph as a diagram an agent can generate and a person can read.',\n pullRequest: 'archify',\n videos: ['archify'],\n reviewers: ['mira', 'kai'],\n opened: 12,\n },\n {\n title: \"Show a pull request's review state on its task pill\",\n status: 'started',\n priority: 'medium',\n description: 'The pill colours by open/merged/closed; approved and changes-requested are invisible.',\n opened: 2,\n },\n {\n title: 'Record a demo for every task in review',\n status: 'todo',\n priority: 'low',\n description: 'A reviewer should be able to watch the change before reading the diff.',\n opened: 1,\n },\n];\n\nexport type WorkResult = {\n project: Project.Project;\n taskSet: TaskSet.TaskSet;\n tasks: Task.Task[];\n pullRequests: Record<PullRequestKey, PullRequest.PullRequest>;\n};\n\n/** Pull requests, reviewers, the task set, and the project that gathers them with the media. */\nexport const Work: SampleSpace.Phase<WorkResult, MediaResult> = SampleSpace.phase('work', {\n schemas: [\n PullRequest.PullRequest,\n Person.Person,\n Task.Task,\n TaskSet.TaskSet,\n Outline.Outline,\n Repo.Repo,\n Project.Project,\n ],\n run: ({ images, videos }: MediaResult) =>\n Effect.gen(function* () {\n const pullRequests = yield* SampleSpace.seed(PULL_REQUEST_SEEDS, ({ key: _key, ...seed }) =>\n Database.add(\n PullRequest.make({\n ...seed,\n owner: 'dxos',\n repo: 'dxos',\n url: `https://github.com/dxos/dxos/pull/${seed.number}`,\n baseBranch: 'main',\n }),\n ),\n );\n\n const reviewers = yield* SampleSpace.seed(REVIEWER_SEEDS, ({ key: _key, ...seed }) =>\n Database.add(Person.make(seed)),\n );\n\n const tasks = TASK_SEEDS.map((seed) =>\n Task.make({\n title: seed.title,\n description: seed.description,\n status: seed.status,\n priority: seed.priority,\n reviewers: seed.reviewers?.map((key) => ({ contact: Ref.make(reviewers[key]) })),\n artifacts: [\n ...(seed.pullRequest ? [Ref.make(pullRequests[seed.pullRequest])] : []),\n ...(seed.images ?? []).map((key) => Ref.make(images[key])),\n ...(seed.videos ?? []).map((key) => Ref.make(videos[key])),\n ],\n history: [{ date: daysAgo(seed.opened), event: 'created', description: 'Opened.' }],\n }),\n );\n\n const taskSet = yield* Database.add(TaskSet.make({ name: 'Composer polish' }));\n yield* SampleSpace.children(taskSet, tasks, (taskSet, refs) => {\n taskSet.tasks = refs;\n });\n\n const repo = yield* Database.add(\n Repo.make({\n name: 'dxos',\n owner: 'dxos',\n url: 'https://github.com/dxos/dxos',\n description: 'TypeScript implementation of the DXOS protocols, SDK, toolchain and Composer.',\n defaultBranch: 'main',\n }),\n );\n const outline = yield* Database.add(Outline.make({ name: 'Review notes' }));\n\n const project = yield* Database.add(\n Project.make({\n name: 'Composer polish',\n description: 'Small, visible fixes to Composer, each landed as a reviewed pull request with a demo.',\n status: 'active',\n repo: Ref.make(repo),\n taskSet: Ref.make(taskSet),\n outline: Ref.make(outline),\n artifacts: [\n ...Object.values(pullRequests).map((pullRequest) => Ref.make(pullRequest)),\n ...Object.values(images).map((image) => Ref.make(image)),\n ...Object.values(videos).map((video) => Ref.make(video)),\n ],\n }),\n );\n\n return { project, taskSet, tasks, pullRequests };\n }),\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Effect from 'effect/Effect';\n\nimport type * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\n\nimport { type AssetLoader, fetchAsset, makeMedia } from './assets.ts';\nimport { REFERENCE } from './util.ts';\nimport { Work } from './work.ts';\n\nexport const TEMPLATE_ID = 'org.dxos.plugin-debug.template.review';\n\nexport type Options = {\n /** Where screenshot bytes come from; defaults to fetching the pinned PR URLs. */\n readonly loadAsset?: AssetLoader;\n};\n\n/**\n * A review queue: one project whose finished tasks carry the merged dxos/dxos pull requests that\n * delivered them, with the screenshots and demo recordings attached to those PRs, and whose tasks in\n * review carry the PRs still open.\n */\nexport const make = ({ loadAsset = fetchAsset }: Options = {}) => {\n const phases = { media: makeMedia(loadAsset), work: Work };\n return SampleSpace.make({\n space: { name: 'Composer — Review queue', icon: 'medal-military', hue: 'green' },\n reference: REFERENCE,\n phases,\n build: (phases) =>\n Effect.gen(function* () {\n const media = yield* phases.media();\n return yield* phases.work(media);\n }),\n });\n};\n\nexport const makeTemplate = (options?: Options): AppCapabilities.SpaceTemplate =>\n SampleSpace.makeTemplate({\n id: TEMPLATE_ID,\n description: 'A project with tasks carrying real dxos pull requests, their screenshots and demo videos.',\n definition: make(options),\n });\n"],"mappings":";;;;;;;;;;AAqBA,IAAa,aAA0B,OAAO,QAAQ;CACpD,IAAI;EACF,MAAM,WAAW,MAAM,MAAM,GAAG;EAChC,IAAI,CAAC,SAAS,IAAI;GAChB,IAAI,KAAK,4BAA4B;IAAE;IAAK,QAAQ,SAAS;GAAO,GAAA;IAAA,YAAA;IAAA,GAAA;IAAA,GAAA;IAAA,GAAA,KAAA;GAAA,CAAC;GACrE;EACF;EACA,OAAO,IAAI,WAAW,MAAM,SAAS,YAAY,CAAC;CACpD,SAAS,OAAO;EACd,IAAI,KAAK,4BAA4B;GAAE;GAAK;EAAM,GAAA;GAAA,YAAA;GAAA,GAAA;GAAA,GAAA;GAAA,GAAA,KAAA;EAAA,CAAC;EACnD;CACF;AACF;AAEA,IAAM,KAAK;AAIX,IAAM,cAAwF;CAC5F;EACE,KAAK;EACL,MAAM;EACN,KAAK;CACP;CAC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AI;CACJ,aAAa;CACb,YAAY,KAAK,OAAO;AAC1B,CAAC"}
@@ -1,23 +1,33 @@
1
1
  import * as AppCapabilities from "@dxos/app-toolkit/AppCapabilities";
2
+ import * as ActivationEvents from "@dxos/app-framework/ActivationEvents";
2
3
  import { meta } from "#meta";
3
- import { useCallback, useEffect, useMemo, useRef, useState } from "react";
4
4
  import { Filter, Obj, Type } from "@dxos/echo";
5
- import { Flex, IconButton, Input, Panel, ScrollArea, composable, composableProps, useAsyncEffect, useTranslation } from "@dxos/react-ui";
6
- import { mx } from "@dxos/ui-theme";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
- import { ComputeGraph } from "@dxos/conductor";
9
5
  import * as Markdown from "@dxos/plugin-markdown/Markdown";
10
6
  import { Organization, Person, Task } from "@dxos/types";
11
7
  import { sortKeys } from "@dxos/util";
8
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
9
+ import * as Button from "@dxos/react-ui/Button";
10
+ import { mx } from "@dxos/ui-theme";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ import { ComputeGraph } from "@dxos/conductor";
13
+ import * as EffectEx from "@dxos/effect/EffectEx";
12
14
  import * as Drawing from "@dxos/plugin-illustrator/Drawing";
13
15
  import * as Sheet from "@dxos/plugin-sheet/Sheet";
14
16
  import * as SpaceOperation from "@dxos/plugin-space/SpaceOperation";
15
- import { useOperationInvoker, useOptionalCapability } from "@dxos/app-framework/ui";
16
- import { useProgressMonitor } from "@dxos/app-toolkit/ui";
17
+ import * as Hooks from "@dxos/app-framework/Hooks";
18
+ import * as ToolkitHooks from "@dxos/app-toolkit/Hooks";
17
19
  import * as LayoutOperation from "@dxos/app-toolkit/LayoutOperation";
18
20
  import { useClient } from "@dxos/react-client";
21
+ import * as PluginManagerProvider from "@dxos/app-framework/PluginManagerProvider";
22
+ import * as UiHooks from "@dxos/react-ui/Hooks";
23
+ import * as Panel from "@dxos/react-ui/Panel";
24
+ import * as ScrollArea from "@dxos/react-ui/ScrollArea";
25
+ import * as Input from "@dxos/react-ui/Input";
26
+ import * as Field from "@dxos/react-ui/Field";
27
+ import * as Layout from "@dxos/react-ui/Layout";
19
28
  import { ProgressMeter } from "@dxos/react-ui-components";
20
- import { Menu, MenuBuilder, useMenuBuilder } from "@dxos/react-ui-menu";
29
+ import { ActionToolbar, MenuBuilder, useMenuBuilder } from "@dxos/react-ui-menu";
30
+ import * as Util from "@dxos/react-ui/Util";
21
31
  import { SchemaTable, createGenerator, generator, staticGenerators } from "#components";
22
32
  //#region src/containers/SpaceGenerator/SpaceGenerator.tsx
23
33
  var staticTypes = [
@@ -32,14 +42,20 @@ var recordTypes = [
32
42
  Task.Task
33
43
  ];
34
44
  var TOAST_DURATION = 5e3;
35
- var SpaceGenerator = composable(({ children, space, onCreateObjects, ...props }, forwardedRef) => {
36
- const { invokePromise } = useOperationInvoker();
37
- const { t } = useTranslation(meta.profile.key);
45
+ var SpaceGenerator = Util.composable(({ children, space, onCreateObjects, ...props }, forwardedRef) => {
46
+ const invoker = Hooks.useOperationInvoker();
47
+ const { invokePromise } = invoker;
48
+ const { t } = UiHooks.useTranslation(meta.profile.key);
38
49
  const client = useClient();
39
50
  const [count, setCount] = useState(1);
40
51
  const [info, setInfo] = useState({});
41
52
  const presets = useMemo(() => generator(), []);
42
- useAsyncEffect(async () => {
53
+ const manager = PluginManagerProvider.usePluginManager();
54
+ const allTemplates = Hooks.useCapabilities(AppCapabilities.SpaceTemplate);
55
+ useEffect(() => {
56
+ EffectEx.runDetached(manager.activate(ActivationEvents.SpaceTemplatesRequested));
57
+ }, [manager]);
58
+ UiHooks.useAsyncEffect(async () => {
43
59
  await client.addTypes([
44
60
  ...staticTypes,
45
61
  ...recordTypes,
@@ -47,16 +63,27 @@ var SpaceGenerator = composable(({ children, space, onCreateObjects, ...props },
47
63
  ]);
48
64
  }, [client, presets]);
49
65
  const typeMap = useMemo(() => {
50
- const recordGenerators = new Map(recordTypes.map((type) => [Type.getTypename(type), createGenerator(client, invokePromise, type)]));
66
+ const recordGenerators = new Map(recordTypes.map((type) => [Type.getTypename(type), createGenerator(client, invoker, manager, type)]));
67
+ const allTemplateGenerators = new Map(allTemplates.map((template) => [template.id, async (space) => {
68
+ await template.apply({
69
+ client,
70
+ space
71
+ });
72
+ return [];
73
+ }]));
51
74
  return new Map([
52
75
  ...staticGenerators,
53
76
  ...presets.items,
54
- ...recordGenerators
77
+ ...recordGenerators,
78
+ ...allTemplateGenerators
55
79
  ]);
56
80
  }, [
57
81
  client,
82
+ invoker,
58
83
  invokePromise,
59
- presets
84
+ manager,
85
+ presets,
86
+ allTemplates
60
87
  ]);
61
88
  const updateInfo = useCallback(async () => {
62
89
  const allSchema = [...space.db.graph.registry.list().filter(Type.isType)];
@@ -76,7 +103,7 @@ var SpaceGenerator = composable(({ children, space, onCreateObjects, ...props },
76
103
  objects: objectMap
77
104
  });
78
105
  }, [space]);
79
- useAsyncEffect(updateInfo, [updateInfo]);
106
+ UiHooks.useAsyncEffect(updateInfo, [updateInfo]);
80
107
  const menuActions = useSpaceGeneratorMenu({
81
108
  updateInfo,
82
109
  handleReset: useCallback(async () => {
@@ -139,59 +166,66 @@ var SpaceGenerator = composable(({ children, space, onCreateObjects, ...props },
139
166
  updateInfo,
140
167
  onCreateObjects
141
168
  ]);
142
- return /* @__PURE__ */ jsx(Menu.Root, {
143
- ...menuActions,
144
- alwaysActive: true,
145
- children: /* @__PURE__ */ jsxs(Panel.Root, {
146
- ...composableProps(props),
147
- ref: forwardedRef,
148
- children: [/* @__PURE__ */ jsx(Panel.Toolbar, { children: /* @__PURE__ */ jsxs(Menu.Toolbar, {
149
- classNames: "dx-document",
150
- children: [/* @__PURE__ */ jsx(Menu.Items, {}), /* @__PURE__ */ jsx(Input.Root, { children: /* @__PURE__ */ jsx(Input.TextInput, {
151
- type: "number",
152
- placeholder: "Count",
153
- classNames: "w-[4rem] text-right",
154
- min: 1,
155
- max: 100,
156
- size: 8,
157
- value: count,
158
- onChange: (event) => setCount(parseInt(event.target.value))
159
- }) })]
160
- }) }), /* @__PURE__ */ jsx(Panel.Content, {
161
- asChild: true,
162
- children: /* @__PURE__ */ jsx(ScrollArea.Root, {
163
- thin: true,
164
- orientation: "vertical",
165
- children: /* @__PURE__ */ jsxs(ScrollArea.Viewport, {
166
- classNames: "dx-document gap-4 divide-y divide-subdued-separator",
167
- children: [
168
- /* @__PURE__ */ jsx(SchemaTable, {
169
- classNames: "py-1",
170
- types: staticTypes,
171
- objects: info.objects,
172
- label: "Static Types",
173
- onClick: handleCreateData
174
- }),
175
- /* @__PURE__ */ jsx(SchemaTable, {
176
- classNames: "py-1",
177
- types: recordTypes,
178
- objects: info.objects,
179
- label: "Record Types",
180
- onClick: handleCreateData
181
- }),
182
- /* @__PURE__ */ jsx(SchemaTable, {
183
- classNames: "py-1",
184
- types: presets.types,
185
- objects: info.objects,
186
- label: "Presets",
187
- onClick: handleCreateData
188
- }),
189
- /* @__PURE__ */ jsx(ProgressGenerator, { classNames: "py-1" })
190
- ]
191
- })
169
+ return /* @__PURE__ */ jsxs(Panel.Root, {
170
+ ...Util.composableProps(props),
171
+ ref: forwardedRef,
172
+ children: [/* @__PURE__ */ jsx(Panel.Header, { children: /* @__PURE__ */ jsx(ActionToolbar, {
173
+ ...menuActions,
174
+ alwaysActive: true,
175
+ classNames: "dx-document",
176
+ children: /* @__PURE__ */ jsx(Field.Root, { children: /* @__PURE__ */ jsx(Input.Root, {
177
+ placeholder: "Count",
178
+ classNames: "w-[4rem] text-right",
179
+ min: 1,
180
+ max: 100,
181
+ size: 8,
182
+ value: count,
183
+ onChange: (event) => setCount(parseInt(event.target.value)),
184
+ type: "number"
185
+ }) })
186
+ }) }), /* @__PURE__ */ jsx(Panel.Body, {
187
+ asChild: true,
188
+ children: /* @__PURE__ */ jsx(ScrollArea.Root, {
189
+ orientation: "vertical",
190
+ children: /* @__PURE__ */ jsxs(ScrollArea.Viewport, {
191
+ classNames: "dx-document gap-4 divide-y divide-separator-subtle",
192
+ children: [
193
+ /* @__PURE__ */ jsx(SchemaTable, {
194
+ classNames: "py-1",
195
+ types: staticTypes,
196
+ objects: info.objects,
197
+ label: "Static Types",
198
+ onClick: handleCreateData
199
+ }),
200
+ /* @__PURE__ */ jsx(SchemaTable, {
201
+ classNames: "py-1",
202
+ types: recordTypes,
203
+ objects: info.objects,
204
+ label: "Record Types",
205
+ onClick: handleCreateData
206
+ }),
207
+ /* @__PURE__ */ jsx(SchemaTable, {
208
+ classNames: "py-1",
209
+ types: presets.types,
210
+ objects: info.objects,
211
+ label: "Presets",
212
+ onClick: handleCreateData
213
+ }),
214
+ allTemplates.length > 0 && /* @__PURE__ */ jsx(SchemaTable, {
215
+ classNames: "py-1",
216
+ types: allTemplates.map(({ id, label }) => ({
217
+ typename: id,
218
+ presetLabel: label
219
+ })),
220
+ objects: info.objects,
221
+ label: "Space Templates",
222
+ onClick: handleCreateData
223
+ }),
224
+ /* @__PURE__ */ jsx(ProgressGenerator, { classNames: "py-1" })
225
+ ]
192
226
  })
193
- })]
194
- })
227
+ })
228
+ })]
195
229
  });
196
230
  });
197
231
  SpaceGenerator.displayName = "SpaceGenerator";
@@ -220,8 +254,8 @@ var useSpaceGeneratorMenu = ({ updateInfo, handleReset, handleCollectGarbage })
220
254
  ]);
221
255
  var TEST_PROGRESS_NAME = `${meta.profile.key}.test-progress`;
222
256
  var ProgressGenerator = ({ classNames }) => {
223
- const registry = useOptionalCapability(AppCapabilities.ProgressRegistry);
224
- const monitor = useProgressMonitor(TEST_PROGRESS_NAME);
257
+ const registry = Hooks.useOptionalCapability(AppCapabilities.ProgressRegistry);
258
+ const monitor = ToolkitHooks.useProgressMonitor(TEST_PROGRESS_NAME);
225
259
  const running = monitor?.status === "running";
226
260
  const intervalRef = useRef(void 0);
227
261
  const clearTimer = useCallback(() => {
@@ -262,17 +296,17 @@ var ProgressGenerator = ({ classNames }) => {
262
296
  }, [clearTimer, registry]);
263
297
  return /* @__PURE__ */ jsxs("div", {
264
298
  className: mx("flex flex-col gap-1 py-1", classNames),
265
- children: [/* @__PURE__ */ jsxs(Flex, {
299
+ children: [/* @__PURE__ */ jsxs(Layout.Flex, {
266
300
  gap: "sm",
267
301
  align: "center",
268
302
  children: [/* @__PURE__ */ jsx("span", {
269
303
  className: "grow",
270
304
  children: "Progress Monitor"
271
- }), running ? /* @__PURE__ */ jsx(IconButton, {
305
+ }), running ? /* @__PURE__ */ jsx(Button.Root, {
272
306
  icon: "ph--x--regular",
273
307
  label: "Cancel test progress",
274
308
  onClick: () => registry?.cancel(TEST_PROGRESS_NAME)
275
- }) : /* @__PURE__ */ jsx(IconButton, {
309
+ }) : /* @__PURE__ */ jsx(Button.Root, {
276
310
  icon: "ph--play--regular",
277
311
  label: "Start test progress",
278
312
  disabled: !registry,