moi-computer 0.11.0 → 0.11.1-dev.be1ed10

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 (362) hide show
  1. package/README.md +2 -2
  2. package/client/AGENTS.md +2 -2
  3. package/client/app/AppRouter.tsx +2 -2
  4. package/client/app/routes/WorkspaceRoute.tsx +7 -9
  5. package/client/app/shell/SidebarLayout.tsx +18 -15
  6. package/client/components/shared/BottomPanel.tsx +26 -14
  7. package/client/components/shared/PanelHeader.tsx +1 -1
  8. package/client/components/shared/ReorderableList.tsx +7 -2
  9. package/client/components/shared/WorkspaceIcon.tsx +92 -0
  10. package/client/components/ui/alert-dialog.tsx +1 -0
  11. package/client/components/ui/button.tsx +1 -53
  12. package/client/components/ui/checkbox.tsx +1 -0
  13. package/client/components/ui/collapsible.tsx +1 -15
  14. package/client/components/ui/dialog.tsx +1 -58
  15. package/client/components/ui/dropdown-menu.tsx +1 -254
  16. package/client/components/ui/hover-card.tsx +1 -44
  17. package/client/components/ui/inline-input.tsx +84 -0
  18. package/client/components/ui/input.tsx +1 -21
  19. package/client/components/ui/popover.tsx +1 -88
  20. package/client/components/ui/resizable.tsx +1 -40
  21. package/client/components/ui/skeleton.tsx +1 -13
  22. package/client/components/ui/slider.tsx +1 -70
  23. package/client/components/ui/spinner.tsx +1 -18
  24. package/client/components/ui/switch.tsx +1 -23
  25. package/client/components/ui/tabs.tsx +1 -0
  26. package/client/components/ui/textarea.tsx +1 -18
  27. package/client/components/ui/toast.tsx +2 -2
  28. package/client/components/ui/tooltip.tsx +1 -51
  29. package/client/features/applets/AppletMount.tsx +1 -1
  30. package/client/features/applets/applet-cache.ts +3 -3
  31. package/client/features/applets/applet-runtime.ts +147 -108
  32. package/client/features/applets/applet-styles.ts +2 -2
  33. package/client/features/applets/applet-thumbnail.ts +6 -8
  34. package/client/features/applets/useApplet.ts +10 -9
  35. package/client/features/chat/ChatPanel.tsx +24 -15
  36. package/client/features/chat/ChatPopup.tsx +9 -5
  37. package/client/features/chat/applet-chat-intents.ts +170 -0
  38. package/client/features/chat/chat-send.ts +116 -64
  39. package/client/features/chat/chat-store.ts +51 -62
  40. package/client/features/chat/composer/ChatComposer.tsx +43 -128
  41. package/client/features/chat/composer/ModelPicker.tsx +47 -60
  42. package/client/features/chat/composer/attachments/AttachmentChip.tsx +99 -0
  43. package/client/features/chat/composer/attachments/DrawingAttachmentChip.tsx +37 -0
  44. package/client/features/chat/composer/attachments/FileAttachmentChip.tsx +22 -0
  45. package/client/features/chat/composer/attachments/TextAttachmentChip.tsx +11 -0
  46. package/client/features/chat/composer/attachments/draft-attachments.ts +168 -0
  47. package/client/features/chat/composer/attachments/types.ts +25 -0
  48. package/client/features/chat/composer/attachments/uploads.ts +26 -0
  49. package/client/features/chat/composer/banners/ErrorBanner.tsx +20 -12
  50. package/client/features/chat/composer/model-order.ts +15 -0
  51. package/client/features/chat/composer/useWorkspaceComposerState.tsx +15 -7
  52. package/client/features/chat/{chat-connection.ts → connection/chat-connection.ts} +1 -1
  53. package/client/features/chat/{chat-frames.ts → connection/chat-frames.ts} +10 -8
  54. package/client/features/chat/{ChatEmptyState.tsx → messages/ChatEmptyState.tsx} +16 -11
  55. package/client/features/chat/{MarkdownContent.tsx → messages/MarkdownContent.tsx} +16 -1
  56. package/client/features/chat/{TurnView.tsx → messages/TurnView.tsx} +27 -19
  57. package/client/features/chat/{group-turns.ts → messages/group-turns.ts} +12 -0
  58. package/client/features/chat/{interleave-notices.ts → messages/interleave-notices.ts} +7 -11
  59. package/client/features/chat/{tool-group → messages/tool-group}/SubagentCard.tsx +1 -1
  60. package/client/features/chat/{tool-group → messages/tool-group}/TimelineRow.tsx +2 -2
  61. package/client/features/chat/{tool-group → messages/tool-group}/ToolCallGroup.tsx +2 -5
  62. package/client/features/chat/{tool-group → messages/tool-group}/format/codex.ts +4 -1
  63. package/client/features/chat/{ChatSelector.tsx → sessions/ChatSelector.tsx} +3 -3
  64. package/client/features/chat/{api.ts → sessions/api.ts} +5 -14
  65. package/client/features/chat/sessions/session-view.ts +53 -0
  66. package/client/features/chat/useChat.ts +42 -24
  67. package/client/features/dev/ChatStatesPage.tsx +8 -7
  68. package/client/features/dev/DevIndexPage.tsx +5 -0
  69. package/client/features/dev/DevRoutes.tsx +2 -0
  70. package/client/features/dev/HarnessDebugPage.tsx +11 -8
  71. package/client/features/dev/ToolCallsPage.tsx +1 -1
  72. package/client/features/dev/UiComponentPreviews.tsx +855 -0
  73. package/client/features/dev/UiComponentsPage.tsx +60 -0
  74. package/client/features/dev/chat-states-fixtures.ts +13 -2
  75. package/client/features/drawings/useChatAnnotation.ts +17 -17
  76. package/client/features/drawings/useDrawingLayer.ts +7 -9
  77. package/client/features/drawings/useViewBuilderSketch.ts +18 -15
  78. package/client/features/home/HomePage.tsx +8 -7
  79. package/client/features/home/WorkspacePreview.tsx +2 -2
  80. package/client/features/home/workspace-presentation.tsx +1 -11
  81. package/client/features/home/workspace-setup/DemoDialog.tsx +3 -2
  82. package/client/features/home/workspace-setup/ImportWorkspaceDialog.tsx +5 -8
  83. package/client/features/home/workspace-setup/WorkspaceAgentStep.tsx +2 -4
  84. package/client/features/home/workspace-setup/WorkspaceDialogContent.tsx +7 -20
  85. package/client/features/overview/HiddenPanel.tsx +109 -0
  86. package/client/features/overview/Overview.tsx +302 -0
  87. package/client/features/overview/WidgetCanvas.tsx +164 -0
  88. package/client/features/{widgets → overview}/WidgetFrame.tsx +25 -17
  89. package/client/features/overview/WorkspaceName.tsx +60 -0
  90. package/client/features/overview/api.ts +30 -0
  91. package/client/features/overview/default/ViewsWidget.tsx +252 -0
  92. package/client/features/overview/default/registry.tsx +36 -0
  93. package/client/features/{widgets → overview}/grid.ts +36 -0
  94. package/client/features/overview/useGridReconcile.ts +94 -0
  95. package/client/features/scratchpad/Scratchpad.tsx +7 -8
  96. package/client/features/scratchpad/ScratchpadControls.tsx +0 -1
  97. package/client/features/scratchpad/useScratchpadSnapshot.tsx +23 -13
  98. package/client/features/settings/GeneralSettings.tsx +55 -58
  99. package/client/features/settings/SettingsLayout.tsx +2 -2
  100. package/client/features/settings/WorkspaceIconPicker.tsx +318 -0
  101. package/client/features/settings/WorkspaceSettingsDialog.tsx +65 -0
  102. package/client/features/settings/api.ts +48 -24
  103. package/client/features/views/ViewBuilder.tsx +5 -4
  104. package/client/features/views/ViewManager.tsx +25 -22
  105. package/client/features/views/api.ts +36 -2
  106. package/client/features/views/useViewBuilderActions.ts +8 -5
  107. package/client/features/views/useViewBuilderDrafts.ts +23 -21
  108. package/client/features/views/view-presentation.ts +13 -0
  109. package/client/features/workspace/{CustomizePanel.tsx → ThemePanel.tsx} +26 -31
  110. package/client/features/workspace/UnavailablePage.tsx +21 -0
  111. package/client/features/workspace/WorkspaceLayoutContext.tsx +4 -7
  112. package/client/features/workspace/WorkspaceScreen.tsx +210 -162
  113. package/client/features/workspace/WorkspaceSplitLayout.tsx +7 -2
  114. package/client/features/workspace/WorkspaceTabs.tsx +2 -0
  115. package/client/features/workspace/api.ts +2 -30
  116. package/client/features/workspace/moi-context.ts +8 -9
  117. package/client/features/workspace/tab-resolution.ts +10 -33
  118. package/client/features/workspace/useWorkspaceNavigation.ts +164 -101
  119. package/client/index.css +23 -30
  120. package/client/lib/app-icon-registry.ts +2 -0
  121. package/client/lib/use-latest-ref.ts +11 -0
  122. package/client/main.tsx +1 -1
  123. package/client/runtime/useWorkspaceEvents.ts +59 -14
  124. package/client/theme.css +5 -5
  125. package/dist/{chunk-tqd3pkg8.css → chunk-60q353jq.css} +1 -1
  126. package/dist/chunk-691pqsj6.js +2 -0
  127. package/dist/chunk-7a5nm4k9.css +1 -0
  128. package/dist/chunk-amb8y04y.js +1 -0
  129. package/dist/chunk-cf3pgy7j.js +546 -0
  130. package/dist/{chunk-11cab5dq.css → chunk-cq2r11fg.css} +1 -1
  131. package/dist/chunk-mzrgr577.js +5 -0
  132. package/dist/chunk-nf2wkvf9.js +14 -0
  133. package/dist/chunk-q6a0g26x.js +1 -0
  134. package/dist/chunk-twgdemkc.js +74 -0
  135. package/dist/chunk-x90k0f5c.js +2 -0
  136. package/dist/chunk-yq00csvd.js +2 -0
  137. package/dist/index.html +1 -1
  138. package/lib/app-icons.ts +1 -0
  139. package/lib/applet-selector.ts +24 -0
  140. package/lib/chat-title.ts +6 -1
  141. package/lib/default-widgets.ts +32 -0
  142. package/lib/format.ts +67 -7
  143. package/lib/message-attachments.ts +40 -0
  144. package/lib/moi-attachments.ts +204 -0
  145. package/lib/moi-context.ts +20 -35
  146. package/lib/navigation.ts +84 -0
  147. package/lib/themes.ts +6 -6
  148. package/lib/types.ts +91 -34
  149. package/lib/workspace-icon.ts +20 -0
  150. package/lib/workspace-layout.ts +22 -2
  151. package/lib/workspace-tabs.ts +9 -33
  152. package/package.json +42 -32
  153. package/registry.json +656 -0
  154. package/server/AGENTS.md +2 -0
  155. package/server/agent.ts +1 -1
  156. package/server/api.ts +139 -66
  157. package/server/applet-typecheck.ts +95 -0
  158. package/server/applets/applet-css.ts +55 -0
  159. package/server/{bundler → applets}/build-applet.ts +13 -242
  160. package/server/applets/build-worker.ts +178 -0
  161. package/server/applets/config.ts +226 -0
  162. package/server/applets/dependencies.ts +206 -0
  163. package/server/{applets.ts → applets/index.ts} +44 -189
  164. package/server/applets/runtime/base.ts +4 -0
  165. package/server/applets/runtime/moi.ts +42 -0
  166. package/server/applets/runtime/rpc.ts +17 -0
  167. package/server/applets/view-source.ts +67 -0
  168. package/server/attachment-message.ts +95 -0
  169. package/server/cli-ui-components.ts +28 -33
  170. package/server/cli.ts +169 -108
  171. package/server/control.ts +63 -42
  172. package/server/data-dir.ts +1 -1
  173. package/server/harness/README.md +45 -50
  174. package/server/harness/acp/NOTES.md +426 -0
  175. package/server/harness/acp/adapter.ts +7 -21
  176. package/server/harness/acp/discovery.ts +27 -30
  177. package/server/harness/acp/model-state.ts +57 -0
  178. package/server/harness/acp/session.ts +49 -56
  179. package/server/harness/claude-code/NOTES.md +54 -13
  180. package/server/harness/claude-code/adapter.ts +8 -25
  181. package/server/harness/claude-code/cli.ts +40 -0
  182. package/server/harness/claude-code/index.ts +13 -5
  183. package/server/harness/claude-code/models.ts +72 -19
  184. package/server/harness/claude-code/session.ts +447 -343
  185. package/server/harness/claude-code/sessions.ts +9 -4
  186. package/server/harness/codex/NOTES.md +222 -350
  187. package/server/harness/codex/adapter.ts +102 -52
  188. package/server/harness/codex/auth.ts +1 -3
  189. package/server/harness/codex/client.ts +169 -249
  190. package/server/harness/codex/discovery.ts +9 -17
  191. package/server/harness/codex/index.ts +3 -1
  192. package/server/harness/codex/pagination.ts +24 -0
  193. package/server/harness/codex/permissions.ts +32 -8
  194. package/server/harness/codex/probe.ts +10 -13
  195. package/server/harness/codex/session.ts +567 -181
  196. package/server/harness/codex/transport.ts +184 -0
  197. package/server/harness/debug.ts +1 -1
  198. package/server/harness/hermes/NOTES.md +19 -1
  199. package/server/harness/hermes/discovery.ts +20 -0
  200. package/server/harness/hermes/index.ts +13 -0
  201. package/server/harness/hermes/models.ts +28 -8
  202. package/server/harness/openclaw/NOTES.md +1 -1
  203. package/server/harness/openclaw/adapter.ts +22 -4
  204. package/server/harness/openclaw/gateway.ts +5 -3
  205. package/server/harness/openclaw/session.ts +27 -27
  206. package/server/harness/types.ts +9 -5
  207. package/server/layout.ts +9 -14
  208. package/server/moi-scaffold.ts +22 -14
  209. package/server/navigation-relay.ts +110 -0
  210. package/server/preview.ts +3 -1
  211. package/server/registry.ts +71 -41
  212. package/server/scratchpad-executor.ts +79 -56
  213. package/server/scratchpad-shape-defaults.ts +82 -0
  214. package/server/selected-session.ts +24 -4
  215. package/server/skill-update.ts +5 -3
  216. package/server/skill-version.ts +4 -7
  217. package/server/skills-template.ts +48 -9
  218. package/server/tabs.ts +19 -33
  219. package/server/tldraw-package.d.ts +4 -0
  220. package/server/ui-components.ts +101 -434
  221. package/server/uploads.ts +0 -0
  222. package/server/view-builders.ts +20 -2
  223. package/server/views.ts +126 -6
  224. package/server/web.ts +46 -13
  225. package/server/widgets.ts +12 -5
  226. package/server/workspace-config.ts +13 -9
  227. package/server/workspace-env.ts +3 -2
  228. package/tsconfig.json +0 -1
  229. package/ui-components/accordion.tsx +71 -0
  230. package/ui-components/alert-dialog.tsx +165 -0
  231. package/ui-components/alert.tsx +68 -0
  232. package/ui-components/attachment.tsx +195 -0
  233. package/ui-components/avatar.tsx +90 -0
  234. package/ui-components/badge.tsx +49 -0
  235. package/ui-components/button-group.tsx +78 -0
  236. package/ui-components/button.tsx +55 -0
  237. package/ui-components/calendar.tsx +180 -0
  238. package/ui-components/card.tsx +84 -0
  239. package/ui-components/carousel.tsx +235 -0
  240. package/ui-components/chart.tsx +338 -0
  241. package/ui-components/checkbox.tsx +28 -0
  242. package/ui-components/collapsible.tsx +15 -0
  243. package/ui-components/combobox.tsx +267 -0
  244. package/ui-components/context-menu.tsx +244 -0
  245. package/ui-components/dialog.tsx +138 -0
  246. package/ui-components/docs/accordion.md +463 -0
  247. package/ui-components/docs/alert-dialog.md +481 -0
  248. package/ui-components/docs/alert.md +301 -0
  249. package/ui-components/docs/attachment.md +689 -0
  250. package/ui-components/docs/avatar.md +495 -0
  251. package/ui-components/docs/badge.md +258 -0
  252. package/ui-components/docs/button-group.md +879 -0
  253. package/ui-components/docs/button.md +26 -0
  254. package/ui-components/docs/calendar.md +862 -0
  255. package/ui-components/docs/card.md +265 -0
  256. package/ui-components/docs/carousel.md +627 -0
  257. package/ui-components/docs/chart.md +1256 -0
  258. package/ui-components/docs/checkbox.md +477 -0
  259. package/ui-components/docs/collapsible.md +446 -0
  260. package/ui-components/docs/combobox.md +1003 -0
  261. package/ui-components/docs/context-menu.md +860 -0
  262. package/ui-components/docs/data-table.md +1580 -0
  263. package/ui-components/docs/date-picker.md +614 -0
  264. package/ui-components/docs/dialog.md +414 -0
  265. package/ui-components/docs/drawer.md +51 -0
  266. package/ui-components/docs/dropdown-menu.md +1000 -0
  267. package/ui-components/docs/field.md +1192 -0
  268. package/ui-components/docs/hover-card.md +275 -0
  269. package/ui-components/docs/input-group.md +866 -0
  270. package/ui-components/docs/input.md +456 -0
  271. package/ui-components/docs/kbd.md +191 -0
  272. package/ui-components/docs/label.md +295 -0
  273. package/ui-components/docs/pagination.md +416 -0
  274. package/ui-components/docs/popover.md +348 -0
  275. package/ui-components/docs/progress.md +214 -0
  276. package/ui-components/docs/radio-group.md +389 -0
  277. package/ui-components/docs/resizable.md +265 -0
  278. package/ui-components/docs/select.md +616 -0
  279. package/ui-components/docs/separator.md +216 -0
  280. package/ui-components/docs/skeleton.md +205 -0
  281. package/ui-components/docs/slider.md +226 -0
  282. package/ui-components/docs/spinner.md +332 -0
  283. package/ui-components/docs/switch.md +236 -0
  284. package/ui-components/docs/table.md +551 -0
  285. package/ui-components/docs/tabs.md +379 -0
  286. package/ui-components/docs/textarea.md +187 -0
  287. package/ui-components/docs/toggle-group.md +370 -0
  288. package/ui-components/docs/toggle.md +91 -0
  289. package/ui-components/docs/tooltip.md +290 -0
  290. package/ui-components/drawer.tsx +213 -0
  291. package/ui-components/dropdown-menu.tsx +263 -0
  292. package/ui-components/field.tsx +224 -0
  293. package/ui-components/hover-card.tsx +46 -0
  294. package/ui-components/input-group.tsx +146 -0
  295. package/ui-components/input.tsx +20 -0
  296. package/ui-components/kbd.tsx +32 -0
  297. package/ui-components/label.tsx +17 -0
  298. package/ui-components/pagination.tsx +124 -0
  299. package/ui-components/popover.tsx +81 -0
  300. package/ui-components/progress.tsx +63 -0
  301. package/ui-components/radio-group.tsx +38 -0
  302. package/ui-components/resizable.tsx +40 -0
  303. package/ui-components/scoped-portal.tsx +31 -0
  304. package/ui-components/select.tsx +195 -0
  305. package/ui-components/separator.tsx +18 -0
  306. package/ui-components/skeleton.tsx +15 -0
  307. package/ui-components/slider.tsx +75 -0
  308. package/ui-components/spinner.tsx +20 -0
  309. package/ui-components/switch.tsx +27 -0
  310. package/ui-components/table.tsx +86 -0
  311. package/ui-components/tabs.tsx +75 -0
  312. package/ui-components/textarea.tsx +17 -0
  313. package/ui-components/toggle-group.tsx +85 -0
  314. package/ui-components/toggle.tsx +42 -0
  315. package/ui-components/tooltip.tsx +61 -0
  316. package/ui-components/utils.ts +8 -0
  317. package/workspace/.claude/skills/moi-workspace/SKILL.md +295 -248
  318. package/workspace/.claude/skills/moi-workspace/references/DESIGN.md +100 -152
  319. package/workspace/.claude/skills/moi-workspace/references/INTENTS.md +156 -0
  320. package/workspace/.claude/skills/moi-workspace/references/UI-COMPONENTS.md +67 -203
  321. package/client/features/chat/attachment-staging.ts +0 -153
  322. package/client/features/chat/uploads.ts +0 -18
  323. package/client/features/chat/useAppletChatMessage.ts +0 -68
  324. package/client/features/settings/IconPicker.tsx +0 -442
  325. package/client/features/settings/WorkspaceSettings.tsx +0 -92
  326. package/client/features/settings/render-icon.ts +0 -173
  327. package/client/features/widgets/HiddenPanel.tsx +0 -80
  328. package/client/features/widgets/WidgetGrid.tsx +0 -123
  329. package/client/features/widgets/Widgets.tsx +0 -264
  330. package/client/features/widgets/useGridReconcile.ts +0 -73
  331. package/dist/chunk-104m57qw.js +0 -2
  332. package/dist/chunk-59zf0m6n.js +0 -1
  333. package/dist/chunk-bj3akjs2.js +0 -1
  334. package/dist/chunk-c9pjqx9m.js +0 -14
  335. package/dist/chunk-j2w2vak4.js +0 -546
  336. package/dist/chunk-k2r9c95m.js +0 -10
  337. package/dist/chunk-kmbxhgwv.js +0 -1
  338. package/dist/chunk-p1yqa71k.js +0 -83
  339. package/dist/chunk-pcnahct1.js +0 -5
  340. package/dist/chunk-r5xrenjy.css +0 -1
  341. package/dist/chunk-tny85yt2.js +0 -2
  342. package/dist/chunk-v7wr1df4.js +0 -2
  343. package/server/bundler/applet-css.ts +0 -155
  344. /package/client/features/chat/{ChatPromptBubbles.tsx → messages/ChatPromptBubbles.tsx} +0 -0
  345. /package/client/features/chat/{ShimmerText.tsx → messages/ShimmerText.tsx} +0 -0
  346. /package/client/features/chat/{preview-turn.ts → messages/preview-turn.ts} +0 -0
  347. /package/client/features/chat/{tool-group → messages/tool-group}/CodeBlock.tsx +0 -0
  348. /package/client/features/chat/{tool-group → messages/tool-group}/Collapse.tsx +0 -0
  349. /package/client/features/chat/{tool-group → messages/tool-group}/ReadImagePreview.tsx +0 -0
  350. /package/client/features/chat/{tool-group → messages/tool-group}/ToolOutput.tsx +0 -0
  351. /package/client/features/chat/{tool-group → messages/tool-group}/detect.ts +0 -0
  352. /package/client/features/chat/{tool-group → messages/tool-group}/fixtures.ts +0 -0
  353. /package/client/features/chat/{tool-group → messages/tool-group}/format/claude.ts +0 -0
  354. /package/client/features/chat/{tool-group → messages/tool-group}/format/hermes.ts +0 -0
  355. /package/client/features/chat/{tool-group → messages/tool-group}/format/index.ts +0 -0
  356. /package/client/features/chat/{tool-group → messages/tool-group}/format/mcp.ts +0 -0
  357. /package/client/features/chat/{tool-group → messages/tool-group}/format/openclaw.ts +0 -0
  358. /package/client/features/chat/{tool-group → messages/tool-group}/format/shared.ts +0 -0
  359. /package/client/features/chat/{tool-group → messages/tool-group}/format/shell.ts +0 -0
  360. /package/client/features/chat/{tool-group → messages/tool-group}/index.ts +0 -0
  361. /package/client/features/chat/{useStickToBottom.ts → messages/useStickToBottom.ts} +0 -0
  362. /package/client/features/chat/{useSelectedSession.ts → sessions/useSelectedSession.ts} +0 -0
package/README.md CHANGED
@@ -33,7 +33,7 @@ Works with the harness you already use:
33
33
  fonts, color scheme and more.
34
34
  - **Scratchpad**. A shared canvas where you ideate together with the agent: ask
35
35
  it to draw diagrams, add feedback or comments, visualize knowledge and plans.
36
- - **Widgets**. A dynamic dashboard made of small apps wired to the data from
36
+ - **Overview**. A dynamic home made of small widgets wired to the data from
37
37
  your workspace. They can be rearranged, modified, and completely customized.
38
38
  - **Views**. An app embedded in the workspace that lives in its own tab. Build
39
39
  complex interfaces: CRMs, task trackers, second brain storage, customer
@@ -41,7 +41,7 @@ Works with the harness you already use:
41
41
 
42
42
  <table>
43
43
  <tr>
44
- <td align="center"><img src="assets/screenshots/moi-moi-dash-2.webp" alt="Widgets dashboard" /><br /><sub>Widgets wired to live project stats</sub></td>
44
+ <td align="center"><img src="assets/screenshots/moi-moi-dash-2.webp" alt="Overview" /><br /><sub>Widgets wired to live project stats</sub></td>
45
45
  <td align="center"><img src="assets/screenshots/moi-magazin-scratch-2.webp" alt="Scratchpad" /><br /><sub>Order funnel on the scratchpad, live from Postgres</sub></td>
46
46
  <td align="center"><img src="assets/screenshots/moi-magazin-products-2.webp" alt="Products view" /><br /><sub>Use the agent as a copilot when working with products</sub></td>
47
47
  </tr>
package/client/AGENTS.md CHANGED
@@ -12,7 +12,7 @@ Before editing host-app UI, read `../DESIGN.md` and the relevant rules in `../.a
12
12
 
13
13
  ## Conventions
14
14
 
15
- - UI components in `components/ui/` are shadcn built on Base UI React.
15
+ - UI components in `components/ui/` are host facades over the shared moi registry components built on Base UI React. Local compatibility copies explain why they cannot re-export yet.
16
16
  - `lib/cn.ts` is `clsx` + `tailwind-merge`.
17
17
 
18
18
  ## Vendored React
@@ -28,7 +28,7 @@ React is not bundled into the app. It ships as locally-vendored ESM in `vendor/r
28
28
 
29
29
  - `app/` owns routes and the app shell. Route files load data and compose features; keep feature UI out of them.
30
30
  - `features/<name>/` owns that feature's components, hooks, state, API hooks, and nearby tests.
31
- - `components/ui/` contains installed shadcn primitives. `components/shared/` contains reusable app components with no feature knowledge.
31
+ - `components/ui/` contains host facades for shared UI primitives. `components/shared/` contains reusable app components with no feature knowledge.
32
32
  - `api/` contains shared request helpers, query keys, and query policies. Feature endpoints stay in the feature's `api.ts`.
33
33
  - `runtime/` contains browser-wide lifecycle code such as HMR and shared workspace events.
34
34
  - `lib/` contains small feature-neutral utilities. Do not use it as a catch-all for components or feature state.
@@ -2,7 +2,7 @@ import { Suspense, lazy, useEffect } from 'react'
2
2
 
3
3
  import { Redirect, Route, Switch, useLocation } from 'wouter'
4
4
 
5
- import { setWorkspaceSwitchHandler } from '@/client/features/chat/chat-connection'
5
+ import { setWorkspaceSwitchHandler } from '@/client/features/chat/connection/chat-connection'
6
6
 
7
7
  import { HomeRoute } from './routes/HomeRoute'
8
8
  import { WorkspaceRoute } from './routes/WorkspaceRoute'
@@ -41,7 +41,7 @@ export function AppRouter() {
41
41
  <Switch>
42
42
  <Route path="/" component={HomeRoute} />
43
43
  <Route path="/dev/*?" component={DevLazy} />
44
- {/* The wildcard is the workspace tab id (`view:orders`, `widgets`, …) —
44
+ {/* The wildcard is the destination path (`views/orders`, `overview`, …) —
45
45
  the URL is the tab address, read downstream with `useParams`. This
46
46
  pattern is its only definition. Keyed by workspace id only, so tab
47
47
  switches never remount the workspace tree. */}
@@ -3,7 +3,7 @@ import { useQueryClient } from '@tanstack/react-query'
3
3
  import { workspaceKeys } from '@/client/api/workspace-keys'
4
4
  import { LedLogo } from '@/client/components/shared/LedLogo'
5
5
  import { SidebarLayout } from '@/client/app/shell/SidebarLayout'
6
- import { useSelectedSession } from '@/client/features/chat/useSelectedSession'
6
+ import { useSelectedSession } from '@/client/features/chat/sessions/useSelectedSession'
7
7
  import { useAppletCacheInvalidation } from '@/client/features/applets/useApplet'
8
8
  import { Workspace } from '@/client/features/workspace/WorkspaceContext'
9
9
  import {
@@ -11,9 +11,8 @@ import {
11
11
  useWorkspaceLayoutCtx
12
12
  } from '@/client/features/workspace/WorkspaceLayoutContext'
13
13
  import { WorkspaceScreen } from '@/client/features/workspace/WorkspaceScreen'
14
- import { useWorkspaceViews, useWorkspaceWidgets } from '@/client/features/workspace/api'
15
- import { useViewBuilders } from '@/client/features/views/api'
16
- import { useGridReconcile } from '@/client/features/widgets/useGridReconcile'
14
+ import { useViewBuilders, useViews } from '@/client/features/views/api'
15
+ import { useWidgets } from '@/client/features/overview/api'
17
16
  import { useWorkspaceEvent } from '@/client/runtime/useWorkspaceEvents'
18
17
 
19
18
  type WorkspaceRouteProps = {
@@ -35,11 +34,10 @@ export function WorkspaceRoute({ id }: WorkspaceRouteProps) {
35
34
  function WorkspaceLoader({ id }: WorkspaceRouteProps) {
36
35
  const queryClient = useQueryClient()
37
36
  const [selectedSessionId] = useSelectedSession()
38
- const { layout, setLayout, isLoading: layoutLoading } = useWorkspaceLayoutCtx()
39
- const widgets = useWorkspaceWidgets(id)
40
- const views = useWorkspaceViews(id)
37
+ const { isLoading: layoutLoading } = useWorkspaceLayoutCtx()
38
+ const widgets = useWidgets(id)
39
+ const views = useViews(id)
41
40
  const builders = useViewBuilders(id)
42
- useGridReconcile(id, widgets.data, layout, setLayout)
43
41
  useAppletCacheInvalidation()
44
42
 
45
43
  useWorkspaceEvent(event => {
@@ -72,7 +70,7 @@ function WorkspaceLoader({ id }: WorkspaceRouteProps) {
72
70
  </div>
73
71
  ) : (
74
72
  <WorkspaceScreen
75
- widgets={widgets.data ?? []}
73
+ widgets={widgets.data}
76
74
  views={views.data ?? []}
77
75
  builders={builders.data ?? []}
78
76
  />
@@ -18,6 +18,7 @@ import { CreateWorkspaceDialog } from '@/client/features/home/workspace-setup/Cr
18
18
  import { DemoDialog } from '@/client/features/home/workspace-setup/DemoDialog'
19
19
  import { ReorderableList } from '@/client/components/shared/ReorderableList'
20
20
  import type { ReorderableRenderState } from '@/client/components/shared/ReorderableList'
21
+ import { WorkspaceIcon } from '@/client/components/shared/WorkspaceIcon'
21
22
  import { Button, buttonVariants } from '@/client/components/ui/button'
22
23
  import {
23
24
  Tooltip,
@@ -25,10 +26,7 @@ import {
25
26
  TooltipProvider,
26
27
  TooltipTrigger
27
28
  } from '@/client/components/ui/tooltip'
28
- import {
29
- workspaceDisplayName,
30
- workspaceProviderIcon
31
- } from '@/client/features/home/workspace-presentation'
29
+ import { workspaceDisplayName } from '@/client/features/home/workspace-presentation'
32
30
  import { cn } from '@/client/lib/cn'
33
31
  import type { WorkspaceEntry } from '@/lib/types'
34
32
 
@@ -53,14 +51,18 @@ type SidebarLayoutProps = {
53
51
  export function SidebarLayout({ children, showWorkspaces = true }: SidebarLayoutProps) {
54
52
  const { data: workspaces } = useWorkspaces()
55
53
 
56
- // `moi config` / the settings modal broadcast `workspace:updated` (identity
57
- // changes) and reorder/create broadcast `workspaces-list:updated`; refetch the
58
- // list so the sidebar reflects it live. Exact: `workspaceKeys.all` is the
54
+ // Identity, theme, and registry changes can all alter a workspace's sidebar
55
+ // presentation. Refetch the list so the sidebar reflects them live. Exact:
56
+ // `workspaceKeys.all` is the
59
57
  // prefix of every workspace query — a prefix invalidation would refetch
60
58
  // transcripts, widgets, and MCP probes in every connected client.
61
59
  const qc = useQueryClient()
62
60
  useWorkspaceEvent(e => {
63
- if (e.type === 'workspace:updated' || e.type === 'workspaces-list:updated') {
61
+ if (
62
+ e.type === 'workspace:updated' ||
63
+ e.type === 'theme:updated' ||
64
+ e.type === 'workspaces-list:updated'
65
+ ) {
64
66
  qc.invalidateQueries({ queryKey: workspaceKeys.all, exact: true })
65
67
  }
66
68
  })
@@ -104,7 +106,7 @@ function Sidebar({ workspaces }: SidebarProps) {
104
106
  className="flex flex-col gap-4"
105
107
  onReorder={ids => reorder.mutate(ids)}
106
108
  renderPlaceholder={() => (
107
- <div className="pointer-events-none absolute top-0 left-1 size-10 rounded-xl bg-accent" />
109
+ <div className="pointer-events-none absolute top-0 left-1 size-12 rounded-xl bg-accent" />
108
110
  )}
109
111
  renderOverlay={ws => <WorkspaceButton workspace={ws} dragOverlay />}
110
112
  renderItem={(ws, state) => <WorkspaceButton workspace={ws} dragState={state} />}
@@ -197,7 +199,7 @@ function WorkspaceButton({ workspace, dragOverlay = false, dragState }: Workspac
197
199
  const [location] = useLocation()
198
200
  const href = `/workspace/${workspace.id}`
199
201
  const label = workspaceDisplayName(workspace)
200
- // A workspace URL carries a tab suffix (`/workspace/:id/view:orders`), so the
202
+ // A workspace URL carries a destination (`/workspace/:id/views/orders`), so the
201
203
  // rail matches the workspace segment, not the whole path. The trailing slash
202
204
  // keeps `/workspace/ws1` from lighting up a sibling `/workspace/ws1-other`.
203
205
  const active = location === href || location.startsWith(`${href}/`)
@@ -212,10 +214,11 @@ function WorkspaceButton({ workspace, dragOverlay = false, dragState }: Workspac
212
214
  active && !dragOverlay && 'bg-accent text-accent-foreground'
213
215
  )}
214
216
  >
215
- <img
216
- src={workspace.icon ?? workspaceProviderIcon[workspace.type ?? 'claude-code']}
217
- alt=""
218
- className="size-7 shrink-0 rounded-xs transition-[border-radius] duration-100 ease-out motion-reduce:transition-none"
217
+ <WorkspaceIcon
218
+ icon={workspace.icon}
219
+ workspaceType={workspace.type}
220
+ workspaceTheme={workspace.theme}
221
+ className="size-7 shrink-0 rounded-md transition-[border-radius] duration-100 ease-out motion-reduce:transition-none"
219
222
  />
220
223
  </div>
221
224
  )
@@ -242,7 +245,7 @@ function WorkspaceButton({ workspace, dragOverlay = false, dragState }: Workspac
242
245
  if (dragState?.isDragging) event.preventDefault()
243
246
  }}
244
247
  className={cn(
245
- 'group flex w-14 flex-col items-center rounded-lg outline-none',
248
+ 'group flex w-14 flex-col items-center rounded-xl outline-none',
246
249
  dragState?.isDragging && 'invisible'
247
250
  )}
248
251
  {...dragState?.dragHandleProps}
@@ -8,22 +8,31 @@ import { Button } from '@/client/components/ui/button'
8
8
  import { cn } from '@/client/lib/cn'
9
9
 
10
10
  type BottomPanelProps = {
11
+ actions?: ReactNode
11
12
  className?: string
12
13
  title: string
13
- children: ReactNode
14
+ children?: ReactNode
14
15
  onClose: () => void
15
16
  // Forwarded to the panel element so the working area can measure its height
16
17
  // and reserve matching space below the grid.
17
18
  ref?: Ref<HTMLDivElement>
18
19
  }
19
20
 
20
- export function BottomPanel({ className, title, children, onClose, ref }: BottomPanelProps) {
21
+ export function BottomPanel({
22
+ actions,
23
+ className,
24
+ title,
25
+ children,
26
+ onClose,
27
+ ref
28
+ }: BottomPanelProps) {
21
29
  return (
22
30
  <motion.div
23
31
  ref={ref}
24
32
  className={cn(
25
- 'absolute inset-x-4 bottom-4 no-scrollbar flex max-h-full flex-col gap-4 overflow-y-auto rounded-2xl bg-card text-card-foreground shadow-md',
26
- 'mx-auto max-w-[calc(var(--chat-max-container)+var(--page-pad)*2)] p-(--page-pad) pb-0',
33
+ 'absolute inset-x-4 bottom-4 no-scrollbar flex max-h-full flex-col gap-4 overflow-y-auto rounded-2xl bg-popover text-popover-foreground shadow-md',
34
+ 'mx-auto max-w-[calc(var(--chat-max-container)+var(--page-pad)*2)] p-(--page-pad)',
35
+ children && 'pb-0',
27
36
  className
28
37
  )}
29
38
  variants={{
@@ -37,17 +46,20 @@ export function BottomPanel({ className, title, children, onClose, ref }: Bottom
37
46
  >
38
47
  <div className="flex shrink-0 items-center justify-between gap-4">
39
48
  <p className="text-sm font-medium">{title}</p>
40
- <Button
41
- type="button"
42
- variant="ghost"
43
- size="icon-sm"
44
- onClick={onClose}
45
- aria-label="Close panel"
46
- >
47
- <IconX stroke={1.75} />
48
- </Button>
49
+ <div className="flex items-center gap-2">
50
+ {actions}
51
+ <Button
52
+ type="button"
53
+ variant="ghost"
54
+ size="icon-sm"
55
+ onClick={onClose}
56
+ aria-label="Close panel"
57
+ >
58
+ <IconX stroke={1.75} />
59
+ </Button>
60
+ </div>
49
61
  </div>
50
- <div className="flex-1 pb-(--page-pad)">{children}</div>
62
+ {children && <div className="flex-1 pb-(--page-pad)">{children}</div>}
51
63
  </motion.div>
52
64
  )
53
65
  }
@@ -5,7 +5,7 @@ export function PanelHeader({ children }: { children?: ReactNode }) {
5
5
  return (
6
6
  <header
7
7
  className={cn(
8
- '@container relative flex shrink-0 items-center gap-2.5 py-2 pr-3 pl-4',
8
+ '@container relative flex shrink-0 items-center gap-1 py-2 pr-3 pl-4',
9
9
  // Header bottom border that overflows the tab content and contrasts with it
10
10
  'after:absolute after:top-full after:left-0 after:h-px after:w-full after:bg-border'
11
11
  )}
@@ -40,6 +40,7 @@ type ReorderableListProps<T> = {
40
40
  className?: string
41
41
  itemClassName?: (item: T, state: ReorderableRenderState) => string | undefined
42
42
  dragDisabled?: boolean
43
+ isItemDragDisabled?: (item: T) => boolean
43
44
  onReorder: (orderedIds: ReorderableId[]) => void
44
45
  renderItem: (item: T, state: ReorderableRenderState) => ReactNode
45
46
  renderPlaceholder?: (item: T) => ReactNode
@@ -63,6 +64,7 @@ export function ReorderableList<T>({
63
64
  className,
64
65
  itemClassName,
65
66
  dragDisabled = false,
67
+ isItemDragDisabled,
66
68
  onReorder,
67
69
  renderItem,
68
70
  renderPlaceholder,
@@ -83,7 +85,10 @@ export function ReorderableList<T>({
83
85
  .map(id => itemById.get(id))
84
86
  .filter((item): item is T => Boolean(item))
85
87
  const draggingItem = draggingId ? itemById.get(draggingId) : undefined
86
- const disabled = dragDisabled || items.length < 2
88
+ const reorderableCount = isItemDragDisabled
89
+ ? items.filter(item => !isItemDragDisabled(item)).length
90
+ : items.length
91
+ const disabled = dragDisabled || reorderableCount < 2
87
92
 
88
93
  const handleDragOver = (event: DragOverEvent) => {
89
94
  const activeId = String(event.active.id)
@@ -132,7 +137,7 @@ export function ReorderableList<T>({
132
137
  key={getId(item)}
133
138
  id={getId(item)}
134
139
  item={item}
135
- disabled={disabled}
140
+ disabled={disabled || isItemDragDisabled?.(item) === true}
136
141
  itemClassName={itemClassName}
137
142
  renderItem={renderItem}
138
143
  renderPlaceholder={renderPlaceholder}
@@ -0,0 +1,92 @@
1
+ import { createElement } from 'react'
2
+
3
+ import claudeIcon from '@/client/assets/claude.svg'
4
+ import hermesIcon from '@/client/assets/hermes.png'
5
+ import openaiIcon from '@/client/assets/openai.svg'
6
+ import openclawIcon from '@/client/assets/openclaw.svg'
7
+ import { resolveAppIcon } from '@/client/lib/app-icon-registry'
8
+ import { cn } from '@/client/lib/cn'
9
+ import { DEFAULT_PRIMARY_COLOR, deriveThemeColors, resolveThemeColorOverrides } from '@/lib/themes'
10
+ import type {
11
+ WorkspaceIcon as WorkspaceIconValue,
12
+ WorkspaceLayout,
13
+ WorkspaceType
14
+ } from '@/lib/types'
15
+
16
+ export const workspaceProviderIcon: Record<WorkspaceType, string> = {
17
+ 'claude-code': claudeIcon,
18
+ openclaw: openclawIcon,
19
+ codex: openaiIcon,
20
+ hermes: hermesIcon
21
+ }
22
+
23
+ type WorkspaceIconProps = {
24
+ className?: string
25
+ icon?: WorkspaceIconValue
26
+ workspaceType?: WorkspaceType | null
27
+ workspaceTheme?: WorkspaceLayout['theme']
28
+ }
29
+
30
+ function renderIconContent(
31
+ icon: WorkspaceIconValue | undefined,
32
+ themed: boolean,
33
+ providerIcon: string
34
+ ) {
35
+ switch (icon?.type) {
36
+ case 'emoji':
37
+ return (
38
+ <span
39
+ aria-hidden="true"
40
+ className={cn(
41
+ 'flex size-full translate-y-[2cqi] items-center justify-center font-[Apple_Color_Emoji,Segoe_UI_Emoji,Noto_Color_Emoji,sans-serif] leading-none',
42
+ themed ? 'text-[60cqi]' : 'text-[85cqi]'
43
+ )}
44
+ >
45
+ {icon.value}
46
+ </span>
47
+ )
48
+ case 'upload':
49
+ return <img src={icon.value} alt="" className="size-full" />
50
+ case 'glyph': {
51
+ const Glyph = resolveAppIcon(icon.value)
52
+ if (Glyph) {
53
+ return createElement(Glyph, {
54
+ 'aria-hidden': true,
55
+ stroke: 1.75,
56
+ className: themed ? 'size-[70%]' : 'size-[95%] text-foreground'
57
+ })
58
+ }
59
+ // Fall through to the default provider icon.
60
+ }
61
+ default:
62
+ return <img src={providerIcon} alt="" className="size-[95%]" />
63
+ }
64
+ }
65
+
66
+ export function WorkspaceIcon({
67
+ className,
68
+ icon,
69
+ workspaceType,
70
+ workspaceTheme
71
+ }: WorkspaceIconProps) {
72
+ const themed = icon?.type !== 'upload' && icon?.background === 'theme'
73
+ const colors = themed
74
+ ? (resolveThemeColorOverrides(workspaceTheme) ?? deriveThemeColors(DEFAULT_PRIMARY_COLOR))
75
+ : undefined
76
+ const providerIcon = workspaceProviderIcon[workspaceType ?? 'claude-code']
77
+
78
+ return (
79
+ <span
80
+ className={cn(
81
+ '@container inline-flex shrink-0 items-center justify-center overflow-hidden',
82
+ themed && 'shadow-[inset_0_0_1rem_rgba(255,255,255,0.3)]',
83
+ className
84
+ )}
85
+ style={
86
+ colors ? { backgroundColor: colors.primary, color: colors.primaryForeground } : undefined
87
+ }
88
+ >
89
+ {renderIconContent(icon, themed, providerIcon)}
90
+ </span>
91
+ )
92
+ }
@@ -0,0 +1 @@
1
+ export * from '@/ui-components/alert-dialog'
@@ -1,53 +1 @@
1
- import { Button as ButtonPrimitive } from '@base-ui/react/button'
2
- import { type VariantProps, cva } from 'class-variance-authority'
3
-
4
- import { cn } from '@/client/lib/cn'
5
-
6
- const buttonVariants = cva(
7
- 'inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-lg text-sm font-medium whitespace-nowrap transition-all duration-100 outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0',
8
- {
9
- variants: {
10
- variant: {
11
- default:
12
- 'bg-primary text-primary-foreground inset-shadow-[0_0_8px_color-mix(in_oklab,var(--color-white)_20%,transparent)] hover:bg-primary/90 disabled:bg-accent disabled:text-muted-foreground disabled:opacity-100 disabled:shadow-none',
13
- secondary:
14
- 'bg-accent text-foreground hover:bg-[color-mix(in_oklch,var(--accent),var(--foreground)_3%)] hover:text-accent-foreground',
15
- outline:
16
- 'bg-background text-foreground shadow-xs hover:text-accent-foreground hover:shadow-sm',
17
- ghost: 'hover:bg-accent hover:text-accent-foreground',
18
- destructive:
19
- 'bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20'
20
- },
21
- size: {
22
- sm: 'h-7 gap-1.5 rounded-md px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg]:size-4',
23
- default:
24
- 'h-8 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5 [&_svg]:size-5',
25
- lg: 'h-10 rounded-xl px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3 [&_svg]:size-5',
26
- 'icon-sm': 'size-7 rounded-md [&_svg]:size-4',
27
- icon: 'size-8 [&_svg]:size-5',
28
- 'icon-lg': 'size-10 rounded-xl [&_svg]:size-5'
29
- }
30
- },
31
- defaultVariants: {
32
- variant: 'default',
33
- size: 'default'
34
- }
35
- }
36
- )
37
-
38
- function Button({
39
- className,
40
- variant = 'default',
41
- size = 'default',
42
- ...props
43
- }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {
44
- return (
45
- <ButtonPrimitive
46
- data-slot="button"
47
- className={cn(buttonVariants({ variant, size, className }))}
48
- {...props}
49
- />
50
- )
51
- }
52
-
53
- export { Button, buttonVariants }
1
+ export * from '@/ui-components/button'
@@ -0,0 +1 @@
1
+ export * from '@/ui-components/checkbox'
@@ -1,15 +1 @@
1
- import { Collapsible as CollapsiblePrimitive } from '@base-ui/react/collapsible'
2
-
3
- function Collapsible({ ...props }: CollapsiblePrimitive.Root.Props) {
4
- return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />
5
- }
6
-
7
- function CollapsibleTrigger({ ...props }: CollapsiblePrimitive.Trigger.Props) {
8
- return <CollapsiblePrimitive.Trigger data-slot="collapsible-trigger" {...props} />
9
- }
10
-
11
- function CollapsibleContent({ ...props }: CollapsiblePrimitive.Panel.Props) {
12
- return <CollapsiblePrimitive.Panel data-slot="collapsible-content" {...props} />
13
- }
14
-
15
- export { Collapsible, CollapsibleTrigger, CollapsibleContent }
1
+ export * from '@/ui-components/collapsible'
@@ -1,58 +1 @@
1
- import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'
2
-
3
- import { cn } from '@/client/lib/cn'
4
-
5
- function Dialog({ ...props }: DialogPrimitive.Root.Props) {
6
- return <DialogPrimitive.Root data-slot="dialog" {...props} />
7
- }
8
-
9
- function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {
10
- return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
11
- }
12
-
13
- function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
14
- return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
15
- }
16
-
17
- function DialogContent({ className, children, ...props }: DialogPrimitive.Popup.Props) {
18
- return (
19
- <DialogPrimitive.Portal>
20
- <DialogPrimitive.Backdrop
21
- data-slot="dialog-backdrop"
22
- className="fixed inset-0 z-50 bg-foreground/40 duration-150 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"
23
- />
24
- <DialogPrimitive.Popup
25
- data-slot="dialog-content"
26
- className={cn(
27
- 'fixed top-1/2 left-1/2 z-50 origin-center -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-xl bg-card text-card-foreground shadow-xl outline-hidden duration-150 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',
28
- className
29
- )}
30
- {...props}
31
- >
32
- {children}
33
- </DialogPrimitive.Popup>
34
- </DialogPrimitive.Portal>
35
- )
36
- }
37
-
38
- function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
39
- return (
40
- <DialogPrimitive.Title
41
- data-slot="dialog-title"
42
- className={cn('text-lg font-semibold', className)}
43
- {...props}
44
- />
45
- )
46
- }
47
-
48
- function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props) {
49
- return (
50
- <DialogPrimitive.Description
51
- data-slot="dialog-description"
52
- className={cn('text-sm text-muted-foreground', className)}
53
- {...props}
54
- />
55
- )
56
- }
57
-
58
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger }
1
+ export * from '@/ui-components/dialog'