@devxcrew/react-ui 0.0.0-stage → 0.1.7

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 (326) hide show
  1. package/README.md +85 -2
  2. package/package.json +105 -4
  3. package/src/blocks/agent-chat-workspace/agent-chat-workspace.tsx +162 -0
  4. package/src/blocks/agent-chat-workspace/index.ts +2 -0
  5. package/src/blocks/agent-provider-settings/agent-provider-settings.tsx +183 -0
  6. package/src/blocks/agent-provider-settings/index.ts +2 -0
  7. package/src/blocks/agent-task-workspace/agent-task-workspace.tsx +48 -0
  8. package/src/blocks/agent-task-workspace/index.ts +2 -0
  9. package/src/blocks/analysis-context/analysis-context.tsx +6 -0
  10. package/src/blocks/analysis-context/index.ts +1 -0
  11. package/src/blocks/app-header/app-header.tsx +159 -0
  12. package/src/blocks/app-header/index.ts +2 -0
  13. package/src/blocks/archived-chat-workspace/archived-chat-workspace.tsx +29 -0
  14. package/src/blocks/archived-chat-workspace/index.ts +2 -0
  15. package/src/blocks/auth/README.md +32 -0
  16. package/src/blocks/auth/admin-login-page.tsx +15 -0
  17. package/src/blocks/auth/admin-password-forgot-page.tsx +5 -0
  18. package/src/blocks/auth/auth-page-layout.tsx +90 -0
  19. package/src/blocks/auth/client-login-page.tsx +20 -0
  20. package/src/blocks/auth/client-password-forgot-page.tsx +5 -0
  21. package/src/blocks/auth/identity-management-desk.tsx +530 -0
  22. package/src/blocks/auth/index.ts +12 -0
  23. package/src/blocks/auth/login-page.tsx +206 -0
  24. package/src/blocks/auth/password-forgot-page.tsx +60 -0
  25. package/src/blocks/auth/portal-pages.tsx +32 -0
  26. package/src/blocks/auth/privileged-desk.tsx +55 -0
  27. package/src/blocks/auth/register-page.tsx +117 -0
  28. package/src/blocks/auth/session-boundary.tsx +296 -0
  29. package/src/blocks/auth/super-admin-login-page.tsx +15 -0
  30. package/src/blocks/auth/super-admin-password-forgot-page.tsx +5 -0
  31. package/src/blocks/blog/blog-card.tsx +156 -0
  32. package/src/blocks/blog/blog-reader.tsx +175 -0
  33. package/src/blocks/blog/blog-types.ts +47 -0
  34. package/src/blocks/blog/index.ts +3 -0
  35. package/src/blocks/chat-composer/chat-composer.tsx +140 -0
  36. package/src/blocks/chat-composer/index.ts +1 -0
  37. package/src/blocks/chat-history/chat-history.tsx +59 -0
  38. package/src/blocks/chat-history/index.ts +1 -0
  39. package/src/blocks/chat-response-progress/chat-response-progress.tsx +34 -0
  40. package/src/blocks/chat-response-progress/index.ts +2 -0
  41. package/src/blocks/chat-runtime-controls/chat-runtime-controls.tsx +56 -0
  42. package/src/blocks/chat-runtime-controls/index.ts +2 -0
  43. package/src/blocks/chat-runtime-trace/chat-runtime-trace.tsx +71 -0
  44. package/src/blocks/chat-runtime-trace/index.ts +2 -0
  45. package/src/blocks/codex-connection-settings/codex-connection-settings.tsx +42 -0
  46. package/src/blocks/codex-connection-settings/index.ts +1 -0
  47. package/src/blocks/dropzone/dropzone-file-item.tsx +113 -0
  48. package/src/blocks/dropzone/dropzone-types.ts +32 -0
  49. package/src/blocks/dropzone/dropzone.tsx +216 -0
  50. package/src/blocks/dropzone/index.ts +3 -0
  51. package/src/blocks/ecommerce/cart/cart-drawer.tsx +228 -0
  52. package/src/blocks/ecommerce/cart/cart-types.ts +27 -0
  53. package/src/blocks/ecommerce/cart/index.ts +2 -0
  54. package/src/blocks/ecommerce/categories/categories-types.ts +23 -0
  55. package/src/blocks/ecommerce/categories/category-showcase.tsx +125 -0
  56. package/src/blocks/ecommerce/categories/index.ts +2 -0
  57. package/src/blocks/ecommerce/checkout/checkout-types.ts +48 -0
  58. package/src/blocks/ecommerce/checkout/checkout-wizard.tsx +468 -0
  59. package/src/blocks/ecommerce/checkout/index.ts +2 -0
  60. package/src/blocks/ecommerce/comparison/comparison-types.ts +28 -0
  61. package/src/blocks/ecommerce/comparison/index.ts +2 -0
  62. package/src/blocks/ecommerce/comparison/product-comparison.tsx +174 -0
  63. package/src/blocks/ecommerce/coupon-wallet/coupon-wallet-types.ts +21 -0
  64. package/src/blocks/ecommerce/coupon-wallet/coupon-wallet.tsx +154 -0
  65. package/src/blocks/ecommerce/coupon-wallet/index.ts +2 -0
  66. package/src/blocks/ecommerce/delivery-tracker/delivery-tracker-types.ts +20 -0
  67. package/src/blocks/ecommerce/delivery-tracker/delivery-tracker.tsx +169 -0
  68. package/src/blocks/ecommerce/delivery-tracker/index.ts +2 -0
  69. package/src/blocks/ecommerce/index.ts +12 -0
  70. package/src/blocks/ecommerce/payment-methods/index.ts +2 -0
  71. package/src/blocks/ecommerce/payment-methods/payment-method-selector.tsx +224 -0
  72. package/src/blocks/ecommerce/payment-methods/payment-methods-types.ts +21 -0
  73. package/src/blocks/ecommerce/price-history/index.ts +2 -0
  74. package/src/blocks/ecommerce/price-history/price-history-chart.tsx +217 -0
  75. package/src/blocks/ecommerce/price-history/price-history-types.ts +16 -0
  76. package/src/blocks/ecommerce/reviews/index.ts +2 -0
  77. package/src/blocks/ecommerce/reviews/reviews-section.tsx +309 -0
  78. package/src/blocks/ecommerce/reviews/reviews-types.ts +26 -0
  79. package/src/blocks/ecommerce/wishlist/index.ts +2 -0
  80. package/src/blocks/ecommerce/wishlist/wishlist-grid.tsx +149 -0
  81. package/src/blocks/ecommerce/wishlist/wishlist-types.ts +19 -0
  82. package/src/blocks/execution-status/README.md +25 -0
  83. package/src/blocks/execution-status/execution-status.tsx +135 -0
  84. package/src/blocks/execution-status/index.ts +2 -0
  85. package/src/blocks/file-tree/file-icons.tsx +84 -0
  86. package/src/blocks/file-tree/file-tree-node.tsx +158 -0
  87. package/src/blocks/file-tree/file-tree-types.ts +33 -0
  88. package/src/blocks/file-tree/file-tree.tsx +163 -0
  89. package/src/blocks/file-tree/index.ts +5 -0
  90. package/src/blocks/filter-builder/filter-builder.tsx +169 -0
  91. package/src/blocks/filter-builder/filter-row.tsx +164 -0
  92. package/src/blocks/filter-builder/filter-types.ts +61 -0
  93. package/src/blocks/filter-builder/index.ts +12 -0
  94. package/src/blocks/footer/footer-types.ts +35 -0
  95. package/src/blocks/footer/index.ts +2 -0
  96. package/src/blocks/footer/site-footer.tsx +212 -0
  97. package/src/blocks/form/form-block.tsx +113 -0
  98. package/src/blocks/form/form-lookup-field.tsx +60 -0
  99. package/src/blocks/form/index.ts +4 -0
  100. package/src/blocks/handover-stack/handover-stack.tsx +41 -0
  101. package/src/blocks/handover-stack/index.ts +1 -0
  102. package/src/blocks/idea-handover/idea-handover-readiness.ts +41 -0
  103. package/src/blocks/idea-handover/idea-handover-workspace.tsx +150 -0
  104. package/src/blocks/idea-handover/index.ts +4 -0
  105. package/src/blocks/kanban/index.ts +11 -0
  106. package/src/blocks/kanban/kanban-board.tsx +146 -0
  107. package/src/blocks/kanban/kanban-card.tsx +149 -0
  108. package/src/blocks/kanban/kanban-column.tsx +102 -0
  109. package/src/blocks/kanban/kanban-types.ts +38 -0
  110. package/src/blocks/loader/global-loader.tsx +90 -0
  111. package/src/blocks/loader/index.ts +1 -0
  112. package/src/blocks/mascot/README.md +21 -0
  113. package/src/blocks/mascot/index.ts +2 -0
  114. package/src/blocks/mascot/mascot.tsx +202 -0
  115. package/src/blocks/master-list/README.md +21 -0
  116. package/src/blocks/master-list/index.ts +12 -0
  117. package/src/blocks/master-list/master-form.tsx +157 -0
  118. package/src/blocks/master-list/master-list-desk.tsx +370 -0
  119. package/src/blocks/master-list/master-list.tsx +189 -0
  120. package/src/blocks/master-list/types.ts +18 -0
  121. package/src/blocks/mermaid-preview/index.ts +1 -0
  122. package/src/blocks/mermaid-preview/mermaid-preview.tsx +164 -0
  123. package/src/blocks/notifications/README.md +7 -0
  124. package/src/blocks/notifications/index.ts +1 -0
  125. package/src/blocks/notifications/notification-center-page.tsx +73 -0
  126. package/src/blocks/pricing/index.ts +7 -0
  127. package/src/blocks/pricing/pricing-table.tsx +173 -0
  128. package/src/blocks/pricing/pricing-types.ts +34 -0
  129. package/src/blocks/product-card/index.ts +2 -0
  130. package/src/blocks/product-card/product-card-types.ts +35 -0
  131. package/src/blocks/product-card/product-card.tsx +183 -0
  132. package/src/blocks/table/data-table-block.tsx +313 -0
  133. package/src/blocks/table/data-table-filter-menu.tsx +48 -0
  134. package/src/blocks/table/data-table-icon-menu-trigger.tsx +44 -0
  135. package/src/blocks/table/data-table-menu-content.tsx +32 -0
  136. package/src/blocks/table/data-table-pagination.tsx +149 -0
  137. package/src/blocks/table/data-table-row-actions.tsx +53 -0
  138. package/src/blocks/table/data-table-status.tsx +42 -0
  139. package/src/blocks/table/data-table-toolbar.tsx +124 -0
  140. package/src/blocks/table/data-table-totals.tsx +31 -0
  141. package/src/blocks/table/index.ts +13 -0
  142. package/src/blocks/workspace/index.ts +19 -0
  143. package/src/blocks/workspace/workspace-action-card.tsx +73 -0
  144. package/src/blocks/workspace/workspace-application-header.tsx +67 -0
  145. package/src/blocks/workspace/workspace-entity-card.tsx +48 -0
  146. package/src/blocks/workspace/workspace-health-summary.tsx +15 -0
  147. package/src/blocks/workspace/workspace-metric-card.tsx +97 -0
  148. package/src/blocks/workspace/workspace-page-header.tsx +43 -0
  149. package/src/blocks/workspace/workspace-publish-status.tsx +15 -0
  150. package/src/blocks/workspace/workspace-route-checklist.tsx +28 -0
  151. package/src/blocks/workspace/workspace-runtime-status.tsx +48 -0
  152. package/src/blocks/workspace/workspace-section-card.tsx +42 -0
  153. package/src/components/accordion.tsx +65 -0
  154. package/src/components/alert-dialog.tsx +160 -0
  155. package/src/components/alert.tsx +68 -0
  156. package/src/components/aspect-ratio.tsx +22 -0
  157. package/src/components/attachment.tsx +195 -0
  158. package/src/components/avatar.tsx +90 -0
  159. package/src/components/badge.tsx +55 -0
  160. package/src/components/breadcrumb.tsx +100 -0
  161. package/src/components/bubble.tsx +123 -0
  162. package/src/components/button-group.tsx +79 -0
  163. package/src/components/button.tsx +71 -0
  164. package/src/components/calendar.tsx +185 -0
  165. package/src/components/card.tsx +100 -0
  166. package/src/components/carousel.tsx +229 -0
  167. package/src/components/chart.tsx +338 -0
  168. package/src/components/checkbox.tsx +27 -0
  169. package/src/components/collapsible.tsx +15 -0
  170. package/src/components/combobox.tsx +269 -0
  171. package/src/components/command.tsx +181 -0
  172. package/src/components/compact-model-switcher.tsx +128 -0
  173. package/src/components/context-menu.tsx +244 -0
  174. package/src/components/dialog.tsx +138 -0
  175. package/src/components/direction.tsx +1 -0
  176. package/src/components/drawer.tsx +208 -0
  177. package/src/components/dropdown-menu.tsx +257 -0
  178. package/src/components/empty.tsx +93 -0
  179. package/src/components/field.tsx +232 -0
  180. package/src/components/hover-card.tsx +45 -0
  181. package/src/components/input-group.tsx +146 -0
  182. package/src/components/input-otp.tsx +83 -0
  183. package/src/components/input.tsx +19 -0
  184. package/src/components/item.tsx +188 -0
  185. package/src/components/kbd.tsx +26 -0
  186. package/src/components/label.tsx +17 -0
  187. package/src/components/markdown-content.tsx +113 -0
  188. package/src/components/marker.tsx +67 -0
  189. package/src/components/menubar.tsx +267 -0
  190. package/src/components/message-scroller.tsx +91 -0
  191. package/src/components/message.tsx +84 -0
  192. package/src/components/native-select.tsx +54 -0
  193. package/src/components/navigation-menu.tsx +160 -0
  194. package/src/components/pagination.tsx +118 -0
  195. package/src/components/popover.tsx +74 -0
  196. package/src/components/progress.tsx +82 -0
  197. package/src/components/questionnaire.tsx +150 -0
  198. package/src/components/radio-group.tsx +35 -0
  199. package/src/components/resizable.tsx +41 -0
  200. package/src/components/rich-text-editor.tsx +604 -0
  201. package/src/components/scroll-area.tsx +47 -0
  202. package/src/components/select.tsx +189 -0
  203. package/src/components/separator.tsx +18 -0
  204. package/src/components/sheet.tsx +125 -0
  205. package/src/components/sidebar.tsx +693 -0
  206. package/src/components/skeleton.tsx +13 -0
  207. package/src/components/slider.tsx +51 -0
  208. package/src/components/sonner.tsx +45 -0
  209. package/src/components/sparkline.tsx +231 -0
  210. package/src/components/spinner.tsx +20 -0
  211. package/src/components/status-badge.tsx +114 -0
  212. package/src/components/switch.tsx +31 -0
  213. package/src/components/table.tsx +91 -0
  214. package/src/components/tabs.tsx +72 -0
  215. package/src/components/textarea.tsx +17 -0
  216. package/src/components/toast.tsx +222 -0
  217. package/src/components/toggle-group.tsx +85 -0
  218. package/src/components/toggle.tsx +42 -0
  219. package/src/components/tooltip.tsx +53 -0
  220. package/src/design-system/README.md +55 -0
  221. package/src/design-system/action-intents.ts +21 -0
  222. package/src/design-system/agent-manifest.ts +83 -0
  223. package/src/design-system/block-registry.ts +272 -0
  224. package/src/design-system/component-registry.ts +142 -0
  225. package/src/design-system/contracts.ts +69 -0
  226. package/src/design-system/defaults.ts +3 -0
  227. package/src/design-system/index.ts +29 -0
  228. package/src/design-system/mcp-server.ts +156 -0
  229. package/src/design-system/page-registry.ts +74 -0
  230. package/src/design-system/selection.ts +67 -0
  231. package/src/design-system/template-registry.ts +33 -0
  232. package/src/features/interface-topology/index.ts +14 -0
  233. package/src/features/interface-topology/interface-topology.types.ts +40 -0
  234. package/src/features/interface-topology/topology-control.tsx +18 -0
  235. package/src/features/interface-topology/topology-inspector.tsx +228 -0
  236. package/src/features/interface-topology/topology-marker.tsx +47 -0
  237. package/src/features/interface-topology/topology-region.tsx +44 -0
  238. package/src/features/interface-topology/use-interface-topology.ts +178 -0
  239. package/src/hooks/use-mobile.ts +19 -0
  240. package/src/hooks/use-scroll-follow.ts +22 -0
  241. package/src/index.ts +11 -0
  242. package/src/layouts/README.md +65 -0
  243. package/src/layouts/agent-workspace/agent-activity-rail.tsx +101 -0
  244. package/src/layouts/agent-workspace/agent-workspace.tsx +27 -0
  245. package/src/layouts/agent-workspace/agent-workspace.types.ts +28 -0
  246. package/src/layouts/agent-workspace/index.ts +7 -0
  247. package/src/layouts/blog-header/blog-header-types.ts +25 -0
  248. package/src/layouts/blog-header/blog-header.tsx +172 -0
  249. package/src/layouts/blog-header/index.ts +2 -0
  250. package/src/layouts/documentation-workspace/README.md +8 -0
  251. package/src/layouts/documentation-workspace/documentation-workspace.tsx +34 -0
  252. package/src/layouts/documentation-workspace/index.ts +1 -0
  253. package/src/layouts/ecommerce-header/ecommerce-actions.tsx +89 -0
  254. package/src/layouts/ecommerce-header/ecommerce-announcement.tsx +43 -0
  255. package/src/layouts/ecommerce-header/ecommerce-drawer.tsx +97 -0
  256. package/src/layouts/ecommerce-header/ecommerce-header-types.ts +59 -0
  257. package/src/layouts/ecommerce-header/ecommerce-header.tsx +47 -0
  258. package/src/layouts/ecommerce-header/ecommerce-navigation.tsx +98 -0
  259. package/src/layouts/ecommerce-header/ecommerce-search.tsx +86 -0
  260. package/src/layouts/ecommerce-header/index.ts +2 -0
  261. package/src/layouts/main-workspace/index.ts +28 -0
  262. package/src/layouts/mdi/index.ts +1 -0
  263. package/src/layouts/mdi/mdi.tsx +20 -0
  264. package/src/layouts/mdi-main/index.ts +27 -0
  265. package/src/layouts/mdi-main/mdi-app-catalog.generated.ts +159 -0
  266. package/src/layouts/mdi-main/mdi-app-catalog.ts +76 -0
  267. package/src/layouts/mdi-main/mdi-app-switcher.tsx +107 -0
  268. package/src/layouts/mdi-main/mdi-feature-settings.tsx +135 -0
  269. package/src/layouts/mdi-main/mdi-global-search.tsx +192 -0
  270. package/src/layouts/mdi-main/mdi-main.tsx +241 -0
  271. package/src/layouts/mdi-main/mdi-notifications-menu.tsx +197 -0
  272. package/src/layouts/mdi-main/mdi-profile-menu.tsx +79 -0
  273. package/src/layouts/mdi-main/mdi-sidebar-navigation.tsx +226 -0
  274. package/src/layouts/mdi-main/mdi-sidebar.tsx +110 -0
  275. package/src/layouts/mdi-main/mdi-status-bar.tsx +26 -0
  276. package/src/layouts/mdi-main/mdi-top-menu-control.ts +4 -0
  277. package/src/layouts/mdi-main/mdi-top-menu.tsx +117 -0
  278. package/src/layouts/mdi-main/mdi-topology.tsx +297 -0
  279. package/src/layouts/mdi-main/mdi-tweak-panel.tsx +104 -0
  280. package/src/layouts/mdi-main/mdi-types.ts +131 -0
  281. package/src/layouts/mdi-main/use-mdi-features.ts +36 -0
  282. package/src/layouts/mdi-main/use-mdi-sidebar-state.ts +59 -0
  283. package/src/layouts/site-header/announcement-bar.tsx +55 -0
  284. package/src/layouts/site-header/category-strip.tsx +41 -0
  285. package/src/layouts/site-header/index.ts +16 -0
  286. package/src/layouts/site-header/main-navbar.tsx +179 -0
  287. package/src/layouts/site-header/mobile-drawer.tsx +140 -0
  288. package/src/layouts/site-header/site-header-types.ts +63 -0
  289. package/src/layouts/site-header/site-header.tsx +58 -0
  290. package/src/lib/random-id.ts +19 -0
  291. package/src/lib/utils.ts +6 -0
  292. package/src/providers/pdf-provider.ts +137 -0
  293. package/src/styles/globals.css +374 -0
  294. package/src/templates/README.md +12 -0
  295. package/src/templates/dashboard-01/components/app-sidebar.tsx +177 -0
  296. package/src/templates/dashboard-01/components/chart-area-interactive.tsx +276 -0
  297. package/src/templates/dashboard-01/components/data-table-cell-viewer.tsx +213 -0
  298. package/src/templates/dashboard-01/components/data-table.tsx +577 -0
  299. package/src/templates/dashboard-01/components/nav-documents.tsx +79 -0
  300. package/src/templates/dashboard-01/components/nav-main.tsx +55 -0
  301. package/src/templates/dashboard-01/components/nav-secondary.tsx +39 -0
  302. package/src/templates/dashboard-01/components/nav-user.tsx +97 -0
  303. package/src/templates/dashboard-01/components/section-cards.tsx +99 -0
  304. package/src/templates/dashboard-01/components/site-header.tsx +14 -0
  305. package/src/templates/dashboard-01/data.json +614 -0
  306. package/src/templates/dashboard-01/index.ts +7 -0
  307. package/src/templates/documentation-sidebar/app-sidebar.tsx +95 -0
  308. package/src/templates/documentation-sidebar/index.ts +2 -0
  309. package/src/templates/sidebar-07/components/app-sidebar.tsx +175 -0
  310. package/src/templates/sidebar-07/components/nav-main.tsx +64 -0
  311. package/src/templates/sidebar-07/components/nav-projects.tsx +79 -0
  312. package/src/templates/sidebar-07/components/nav-user.tsx +105 -0
  313. package/src/templates/sidebar-07/components/team-switcher.tsx +94 -0
  314. package/src/templates/sidebar-07/index.ts +1 -0
  315. package/src/templates/ui-page/index.ts +7 -0
  316. package/src/templates/ui-page/ui-browser-frame.tsx +27 -0
  317. package/src/templates/ui-page/ui-template-code.tsx +48 -0
  318. package/src/templates/ui-page/ui-template-header.tsx +87 -0
  319. package/src/templates/ui-page/ui-template-navigation.tsx +60 -0
  320. package/src/templates/ui-page/ui-template-page.tsx +97 -0
  321. package/src/theme/index.ts +12 -0
  322. package/src/theme/theme-config.ts +30 -0
  323. package/src/theme/theme-provider.tsx +142 -0
  324. package/src/theme/theme-selector.tsx +75 -0
  325. package/src/tokens/index.ts +15 -0
  326. package/src/vite-env.d.ts +3 -0
@@ -0,0 +1,297 @@
1
+ import { createContext, useContext, type ReactNode } from "react";
2
+ import type { InterfaceTopologyController, InterfaceTopologySection } from "../../features/interface-topology";
3
+
4
+ const MdiTopologyContext = createContext<InterfaceTopologyController | null>(null);
5
+
6
+ export const mdiTopologySections: readonly InterfaceTopologySection[] = [
7
+ {
8
+ id: "01",
9
+ technicalName: "mdi.commandBar.container",
10
+ name: "Command bar",
11
+ scope: "Application chrome",
12
+ description: "Holds navigation, identity, search, notifications, applications, and profile controls.",
13
+ },
14
+ {
15
+ id: "01.1",
16
+ technicalName: "mdi.commandBar.navigationToggle",
17
+ name: "Navigation toggle",
18
+ scope: "Command bar",
19
+ description: "Shows or hides the application navigation rail.",
20
+ },
21
+ {
22
+ id: "01.2",
23
+ technicalName: "mdi.commandBar.applicationIdentity",
24
+ name: "Application identity",
25
+ scope: "Command bar",
26
+ description: "Identifies the active CODEXSUN application.",
27
+ },
28
+ {
29
+ id: "01.3",
30
+ technicalName: "mdi.commandBar.globalSearch",
31
+ name: "Global search",
32
+ scope: "Command bar",
33
+ description: "Opens global search for the active workspace and application destinations.",
34
+ },
35
+ {
36
+ id: "01.3.1",
37
+ technicalName: "mdi.globalSearch.triggerButton",
38
+ name: "Global search button",
39
+ scope: "Global search",
40
+ description: "Opens global search by pointer or Control K.",
41
+ },
42
+ {
43
+ id: "01.3.2",
44
+ technicalName: "mdi.globalSearch.dialogPanel",
45
+ name: "Global search dialog",
46
+ scope: "Global search",
47
+ description: "Hosts the search input and matching destinations.",
48
+ },
49
+ {
50
+ id: "01.3.3",
51
+ technicalName: "mdi.globalSearch.queryInput",
52
+ name: "Search query input",
53
+ scope: "Global search dialog",
54
+ description: "Sends the current query to the application search contract.",
55
+ },
56
+ {
57
+ id: "01.3.4",
58
+ technicalName: "mdi.globalSearch.destinationList",
59
+ name: "Search destination list",
60
+ scope: "Global search dialog",
61
+ description: "Filters workspace navigation and application destinations.",
62
+ },
63
+ {
64
+ id: "01.4",
65
+ technicalName: "mdi.commandBar.notifications",
66
+ name: "Notifications",
67
+ scope: "Command bar",
68
+ description: "Opens application notifications.",
69
+ },
70
+ {
71
+ id: "01.4.1",
72
+ technicalName: "mdi.notifications.triggerButton",
73
+ name: "Notification button",
74
+ scope: "Notifications",
75
+ description: "Opens the notification panel and shows unread activity.",
76
+ },
77
+ {
78
+ id: "01.4.2",
79
+ technicalName: "mdi.notifications.dropdownPanel",
80
+ name: "Notification dropdown",
81
+ scope: "Notifications",
82
+ description: "Shows unread status and application notification content.",
83
+ },
84
+ {
85
+ id: "01.4.3",
86
+ technicalName: "mdi.notifications.notificationList",
87
+ name: "Notification list",
88
+ scope: "Notification dropdown",
89
+ description: "Lists application-owned notification records or the current empty state.",
90
+ },
91
+ {
92
+ id: "01.5",
93
+ technicalName: "mdi.commandBar.applicationSwitcher",
94
+ name: "Application switcher",
95
+ scope: "Command bar",
96
+ description: "Opens other registered applications.",
97
+ },
98
+ {
99
+ id: "01.5.1",
100
+ technicalName: "mdi.appSwitcher.triggerButton",
101
+ name: "Application launcher button",
102
+ scope: "Application switcher",
103
+ description: "Opens the application launcher with a nine-dot symbol.",
104
+ },
105
+ {
106
+ id: "01.5.2",
107
+ technicalName: "mdi.appSwitcher.dropdownPanel",
108
+ name: "Application launcher panel",
109
+ scope: "Application switcher",
110
+ description: "Shows the application launcher popover.",
111
+ },
112
+ {
113
+ id: "01.5.3",
114
+ technicalName: "mdi.appSwitcher.applicationGrid",
115
+ name: "Application grid",
116
+ scope: "Application launcher panel",
117
+ description: "Lists all application destinations in a three-column grid.",
118
+ },
119
+ {
120
+ id: "01.6",
121
+ technicalName: "mdi.commandBar.profileMenu",
122
+ name: "Profile menu",
123
+ scope: "Command bar",
124
+ description: "Opens profile and session actions.",
125
+ },
126
+ {
127
+ id: "01.6.1",
128
+ technicalName: "mdi.profile.triggerButton",
129
+ name: "User button",
130
+ scope: "Profile menu",
131
+ description: "Shows the user avatar or the first letter of the user name.",
132
+ },
133
+ {
134
+ id: "01.6.2",
135
+ technicalName: "mdi.profile.dropdownPanel",
136
+ name: "Profile dropdown",
137
+ scope: "Profile menu",
138
+ description: "Shows the current user identity and session actions.",
139
+ },
140
+ {
141
+ id: "01.6.3",
142
+ technicalName: "mdi.profile.userAvatar",
143
+ name: "User avatar",
144
+ scope: "Profile dropdown",
145
+ description: "Shows an image when supplied and a name initial otherwise.",
146
+ },
147
+ {
148
+ id: "01.6.4",
149
+ technicalName: "mdi.profile.sessionActions",
150
+ name: "Session actions",
151
+ scope: "Profile dropdown",
152
+ description: "Contains the shared sign-out action.",
153
+ },
154
+ {
155
+ id: "02",
156
+ technicalName: "mdi.navigation.sidebar",
157
+ name: "Application sidebar",
158
+ scope: "Application chrome",
159
+ description: "Contains the primary action, navigation, and feature settings.",
160
+ },
161
+ {
162
+ id: "02.2",
163
+ technicalName: "mdi.navigation.primaryAction",
164
+ name: "Primary action",
165
+ scope: "Application sidebar",
166
+ description: "Starts the primary workspace action.",
167
+ },
168
+ {
169
+ id: "02.3",
170
+ technicalName: "mdi.navigation.sectionList",
171
+ name: "Navigation sections",
172
+ scope: "Application sidebar",
173
+ description: "Lists application-owned destinations and actions.",
174
+ },
175
+ {
176
+ id: "02.4",
177
+ technicalName: "mdi.navigation.featureSettings",
178
+ name: "Feature settings",
179
+ scope: "Application sidebar",
180
+ description: "Opens shared MDI feature controls.",
181
+ },
182
+ {
183
+ id: "02.5",
184
+ technicalName: "mdi.navigation.railToggle",
185
+ name: "Sidebar rail toggle",
186
+ scope: "Application sidebar",
187
+ description: "Collapses or expands the sidebar.",
188
+ },
189
+ {
190
+ id: "03",
191
+ technicalName: "mdi.workspace.canvas",
192
+ name: "Workspace canvas",
193
+ scope: "Application workspace",
194
+ description: "Hosts the active application-owned page.",
195
+ },
196
+ {
197
+ id: "04",
198
+ technicalName: "mdi.statusBar.container",
199
+ name: "Status bar",
200
+ scope: "Application chrome",
201
+ description: "Shows runtime state and the active workspace name.",
202
+ },
203
+ {
204
+ id: "05",
205
+ technicalName: "mdi.appearance.control",
206
+ name: "Appearance control",
207
+ scope: "Application chrome",
208
+ description: "Opens density, canvas, and feature controls.",
209
+ },
210
+ {
211
+ id: "05.1",
212
+ technicalName: "mdi.appearance.themeSelector",
213
+ name: "Theme selector",
214
+ scope: "Appearance control",
215
+ description: "Selects the shared color mode and accent composition.",
216
+ },
217
+ {
218
+ id: "06",
219
+ technicalName: "mdi.features.workspace",
220
+ name: "Feature settings workspace",
221
+ scope: "Application settings",
222
+ description: "Controls the visibility of shared MDI features.",
223
+ },
224
+ {
225
+ id: "06.1",
226
+ technicalName: "mdi.features.backButton",
227
+ name: "Back to workspace",
228
+ scope: "Feature settings",
229
+ description: "Returns to the active application workspace.",
230
+ },
231
+ {
232
+ id: "06.2",
233
+ technicalName: "mdi.features.optionList",
234
+ name: "Feature option list",
235
+ scope: "Feature settings",
236
+ description: "Lists all configurable MDI features.",
237
+ },
238
+ {
239
+ id: "06.2.1",
240
+ technicalName: "mdi.features.topMenuSwitch",
241
+ name: "Top menu switch",
242
+ scope: "Feature option list",
243
+ description: "Shows or hides the shared top menu.",
244
+ },
245
+ {
246
+ id: "06.2.2",
247
+ technicalName: "mdi.features.notificationsSwitch",
248
+ name: "Notifications switch",
249
+ scope: "Feature option list",
250
+ description: "Shows or hides notifications.",
251
+ },
252
+ {
253
+ id: "06.2.3",
254
+ technicalName: "mdi.features.applicationSwitcher",
255
+ name: "Application switcher control",
256
+ scope: "Feature option list",
257
+ description: "Shows or hides the application switcher.",
258
+ },
259
+ {
260
+ id: "06.2.4",
261
+ technicalName: "mdi.features.profileMenuSwitch",
262
+ name: "Profile menu switch",
263
+ scope: "Feature option list",
264
+ description: "Shows or hides the profile menu.",
265
+ },
266
+ {
267
+ id: "06.2.5",
268
+ technicalName: "mdi.features.statusBarSwitch",
269
+ name: "Status bar switch",
270
+ scope: "Feature option list",
271
+ description: "Shows or hides the status bar.",
272
+ },
273
+ {
274
+ id: "06.2.6",
275
+ technicalName: "mdi.features.primaryActivityRailSwitch",
276
+ name: "Primary activity rail switch",
277
+ scope: "Feature option list",
278
+ description: "Shows or hides the primary Agent Workspace activity rail.",
279
+ },
280
+ {
281
+ id: "06.2.7",
282
+ technicalName: "mdi.features.secondaryUtilityRailSwitch",
283
+ name: "Secondary utility rail switch",
284
+ scope: "Feature option list",
285
+ description: "Shows or hides the secondary Agent Workspace utility rail.",
286
+ },
287
+ ];
288
+
289
+ export function MdiTopologyProvider({ children, value }: { children: ReactNode; value: InterfaceTopologyController }) {
290
+ return <MdiTopologyContext.Provider value={value}>{children}</MdiTopologyContext.Provider>;
291
+ }
292
+
293
+ export function useMdiTopology() {
294
+ const topology = useContext(MdiTopologyContext);
295
+ if (!topology) throw new Error("useMdiTopology must be used inside MainWorkspace.");
296
+ return topology;
297
+ }
@@ -0,0 +1,104 @@
1
+ import { SlidersHorizontalIcon } from 'lucide-react';
2
+
3
+ import { Button } from '@devxcrew/react-ui/components/button';
4
+ import {
5
+ Popover,
6
+ PopoverContent,
7
+ PopoverDescription,
8
+ PopoverHeader,
9
+ PopoverTitle,
10
+ PopoverTrigger,
11
+ } from '@devxcrew/react-ui/components/popover';
12
+ import { cn } from '@devxcrew/react-ui/lib/utils';
13
+ import { TopologyMarker, TopologyRegion } from '../../features/interface-topology';
14
+ import { ThemeSelector } from '../../theme';
15
+ import { useMdiTopology } from './mdi-topology';
16
+
17
+ export type MdiCanvas = 'grid' | 'plain';
18
+ export type MdiDensity = 'comfortable' | 'compact';
19
+
20
+ type MdiTweakPanelProps = {
21
+ canvas: MdiCanvas;
22
+ density: MdiDensity;
23
+ onCanvasChange: (canvas: MdiCanvas) => void;
24
+ onDensityChange: (density: MdiDensity) => void;
25
+ onOpenFeatures: () => void;
26
+ };
27
+
28
+ export function MdiTweakPanel({
29
+ canvas,
30
+ density,
31
+ onCanvasChange,
32
+ onDensityChange,
33
+ onOpenFeatures,
34
+ }: MdiTweakPanelProps) {
35
+ const topology = useMdiTopology();
36
+ return (
37
+ <div
38
+ className="fixed right-3 bottom-8 z-40 data-[ito-highlighted=true]:ring-2 data-[ito-highlighted=true]:ring-inset data-[ito-highlighted=true]:ring-violet-700"
39
+ {...topology.regionProps('05')}
40
+ >
41
+ <TopologyMarker id="05" topology={topology} />
42
+ <Popover>
43
+ <PopoverTrigger render={<Button variant="outline" size="icon" aria-label="Open workspace appearance" />}>
44
+ <SlidersHorizontalIcon />
45
+ </PopoverTrigger>
46
+ <PopoverContent align="end" side="top" className="w-64 gap-4">
47
+ <PopoverHeader>
48
+ <PopoverTitle>Workspace appearance</PopoverTitle>
49
+ <PopoverDescription>Adjust the MDI shell while its structure is reviewed.</PopoverDescription>
50
+ </PopoverHeader>
51
+ <TopologyRegion as="div" id="05.1" topology={topology}>
52
+ <ThemeSelector />
53
+ </TopologyRegion>
54
+ <OptionGroup
55
+ label="Density"
56
+ options={['compact', 'comfortable']}
57
+ value={density}
58
+ onChange={onDensityChange}
59
+ />
60
+ <OptionGroup label="Canvas" options={['plain', 'grid']} value={canvas} onChange={onCanvasChange} />
61
+ <Button variant="outline" className="w-full" onClick={onOpenFeatures}>
62
+ Feature settings
63
+ </Button>
64
+ </PopoverContent>
65
+ </Popover>
66
+ </div>
67
+ );
68
+ }
69
+
70
+ function OptionGroup<T extends string>({
71
+ label,
72
+ onChange,
73
+ options,
74
+ value,
75
+ }: {
76
+ label: string;
77
+ onChange: (value: T) => void;
78
+ options: T[];
79
+ value: T;
80
+ }) {
81
+ return (
82
+ <div className="flex flex-col gap-2">
83
+ <span className="text-sm font-medium">{label}</span>
84
+ <div className="grid grid-cols-2 gap-1 rounded-lg bg-muted p-1">
85
+ {options.map((option) => (
86
+ <button
87
+ key={option}
88
+ type="button"
89
+ aria-pressed={value === option}
90
+ className={cn(
91
+ 'h-7 rounded-md px-2 text-sm capitalize transition-colors',
92
+ value === option
93
+ ? 'bg-background text-foreground shadow-sm'
94
+ : 'text-muted-foreground hover:text-foreground',
95
+ )}
96
+ onClick={() => onChange(option)}
97
+ >
98
+ {option}
99
+ </button>
100
+ ))}
101
+ </div>
102
+ </div>
103
+ );
104
+ }
@@ -0,0 +1,131 @@
1
+ import type { LucideIcon } from "lucide-react";
2
+ import type { ReactNode } from "react";
3
+ import type { InterfaceTopologySection } from "../../features/interface-topology";
4
+ import type { AgentWorkspaceProps } from "../agent-workspace";
5
+
6
+ export type MdiFeatures = {
7
+ appSwitcher: boolean;
8
+ ito: boolean;
9
+ notifications: boolean;
10
+ primaryActivityRail: boolean;
11
+ profileMenu: boolean;
12
+ secondaryUtilityRail: boolean;
13
+ statusBar: boolean;
14
+ topMenu: boolean;
15
+ };
16
+
17
+ export type MdiFeatureKey = keyof MdiFeatures;
18
+
19
+ export type MdiAppItem = {
20
+ active?: boolean;
21
+ href?: string;
22
+ icon: LucideIcon;
23
+ label: string;
24
+ onSelect?: () => void;
25
+ };
26
+
27
+ export type MdiNavigationItem = {
28
+ active?: boolean;
29
+ badge?: string | number;
30
+ children?: MdiNavigationItem[];
31
+ defaultOpen?: boolean;
32
+ href?: string;
33
+ icon?: LucideIcon;
34
+ label: string;
35
+ onSelect?: () => void;
36
+ };
37
+
38
+ export type MdiNavigationSection = {
39
+ defaultOpen?: boolean;
40
+ icon?: LucideIcon;
41
+ items: MdiNavigationItem[];
42
+ label?: string;
43
+ };
44
+
45
+ export type MdiPrimaryAction = {
46
+ icon?: LucideIcon;
47
+ label: string;
48
+ onSelect?: () => void;
49
+ };
50
+
51
+ export type MdiNotification = {
52
+ description?: string;
53
+ id: string;
54
+ read?: boolean;
55
+ severity?: "info" | "success" | "warning" | "error";
56
+ time?: string;
57
+ title: string;
58
+ onRead?: () => void;
59
+ onSelect?: () => void;
60
+ };
61
+
62
+ export type MdiUser = {
63
+ avatarUrl?: string;
64
+ email?: string;
65
+ initials: string;
66
+ name: string;
67
+ onManageProfile?: () => void;
68
+ onSignOut?: () => void;
69
+ };
70
+
71
+ export type MainWorkspaceProps = {
72
+ agentWorkspace?: Omit<AgentWorkspaceProps, "children" | "showPrimaryRail" | "showSecondaryRail">;
73
+ applicationIcon?: LucideIcon;
74
+ applicationLogoUrl?: string;
75
+ applicationId?: string;
76
+ applicationName?: string;
77
+ applicationHeaderStart?: ReactNode;
78
+ applicationHeaderEnd?: ReactNode;
79
+ applicationHeaderMeta?: ReactNode;
80
+ applicationHeaderBelow?: ReactNode;
81
+ applicationHeaderStatus?: ReactNode;
82
+ applicationHeaderTitle?: ReactNode;
83
+ showApplicationIdentity?: boolean;
84
+ showApplicationHeader?: boolean;
85
+ showWorkspaceTitleInHeader?: boolean;
86
+ apps?: MdiAppItem[];
87
+ children?: ReactNode;
88
+ contentClassName?: string;
89
+ defaultFeatures?: Partial<MdiFeatures>;
90
+ requiredFeatures?: Partial<MdiFeatures>;
91
+ defaultSidebarOpen?: boolean;
92
+ deskRegionId?: string;
93
+ embedded?: boolean;
94
+ navigation?: MdiNavigationSection[];
95
+ notificationCount?: number;
96
+ notifications?: readonly MdiNotification[];
97
+ primaryAction?: MdiPrimaryAction | null;
98
+ searchPlaceholder?: string;
99
+ searchValue?: string;
100
+ showMdiOverview?: boolean;
101
+ showTopologyTools?: boolean;
102
+ settingsContent?: (props: MdiSettingsContentProps) => ReactNode;
103
+ sidebarContent?: ReactNode;
104
+ sidebarContentClassName?: string;
105
+ sidebarFooter?: ReactNode | null;
106
+ sidebarFooterClassName?: string;
107
+ sidebarStateKey?: string;
108
+ statusLabel?: string;
109
+ statusEnd?: ReactNode;
110
+ topologySections?: readonly InterfaceTopologySection[];
111
+ user?: MdiUser;
112
+ workspaceTitle?: string;
113
+ onSearchChange?: (value: string) => void;
114
+ };
115
+
116
+ export type MdiSettingsContentProps = {
117
+ features: MdiFeatures;
118
+ onBack: () => void;
119
+ onFeatureChange: (feature: MdiFeatureKey, enabled: boolean) => void;
120
+ };
121
+
122
+ export const defaultMdiFeatures: MdiFeatures = {
123
+ appSwitcher: true,
124
+ ito: true,
125
+ notifications: true,
126
+ primaryActivityRail: true,
127
+ profileMenu: true,
128
+ secondaryUtilityRail: true,
129
+ statusBar: true,
130
+ topMenu: true,
131
+ };
@@ -0,0 +1,36 @@
1
+ import { useEffect, useState } from 'react'
2
+
3
+ import { defaultMdiFeatures, type MdiFeatureKey, type MdiFeatures } from './mdi-types'
4
+
5
+ export function useMdiFeatures(
6
+ applicationId: string,
7
+ defaults: Partial<MdiFeatures> = {},
8
+ ): [MdiFeatures, (feature: MdiFeatureKey, enabled: boolean) => void] {
9
+ const storageKey = `codexsun.ui.mdi.features.${applicationId}`
10
+ const [features, setFeatures] = useState<MdiFeatures>(() =>
11
+ readFeatures(storageKey, { ...defaultMdiFeatures, ...defaults }),
12
+ )
13
+
14
+ useEffect(() => {
15
+ window.localStorage.setItem(storageKey, JSON.stringify(features))
16
+ }, [features, storageKey])
17
+
18
+ function setFeature(feature: MdiFeatureKey, enabled: boolean): void {
19
+ setFeatures((current) => ({ ...current, [feature]: enabled }))
20
+ }
21
+
22
+ return [features, setFeature]
23
+ }
24
+
25
+ function readFeatures(storageKey: string, defaults: MdiFeatures): MdiFeatures {
26
+ if (typeof window === 'undefined') return defaults
27
+
28
+ try {
29
+ const stored = JSON.parse(
30
+ window.localStorage.getItem(storageKey) ?? '{}',
31
+ ) as Partial<MdiFeatures>
32
+ return { ...defaults, ...stored }
33
+ } catch {
34
+ return defaults
35
+ }
36
+ }
@@ -0,0 +1,59 @@
1
+ import { useLayoutEffect, useRef, useState, type UIEventHandler } from 'react'
2
+
3
+ export function usePersistentOpenState(storageKey: string | undefined, defaultOpen: boolean) {
4
+ const [open, setOpenState] = useState(() => readBoolean(storageKey) ?? defaultOpen)
5
+
6
+ const setOpen = (nextOpen: boolean) => {
7
+ setOpenState(nextOpen)
8
+ writeValue(storageKey, String(nextOpen))
9
+ }
10
+
11
+ return [open, setOpen] as const
12
+ }
13
+
14
+ export function usePersistentScrollPosition(storageKey: string | undefined) {
15
+ const ref = useRef<HTMLDivElement>(null)
16
+
17
+ useLayoutEffect(() => {
18
+ const scrollTop = readNumber(storageKey)
19
+ if (ref.current && scrollTop !== undefined) ref.current.scrollTop = scrollTop
20
+ }, [storageKey])
21
+
22
+ const onScroll: UIEventHandler<HTMLDivElement> = (event) => {
23
+ writeValue(storageKey, String(event.currentTarget.scrollTop))
24
+ }
25
+
26
+ return { onScroll, ref }
27
+ }
28
+
29
+ function readBoolean(storageKey: string | undefined) {
30
+ const value = readValue(storageKey)
31
+ if (value === 'true') return true
32
+ if (value === 'false') return false
33
+ return undefined
34
+ }
35
+
36
+ function readNumber(storageKey: string | undefined) {
37
+ const value = readValue(storageKey)
38
+ if (value === undefined) return undefined
39
+ const number = Number(value)
40
+ return Number.isFinite(number) ? number : undefined
41
+ }
42
+
43
+ function readValue(storageKey: string | undefined) {
44
+ if (!storageKey || typeof window === 'undefined') return undefined
45
+ try {
46
+ return window.sessionStorage.getItem(storageKey) ?? undefined
47
+ } catch {
48
+ return undefined
49
+ }
50
+ }
51
+
52
+ function writeValue(storageKey: string | undefined, value: string) {
53
+ if (!storageKey || typeof window === 'undefined') return
54
+ try {
55
+ window.sessionStorage.setItem(storageKey, value)
56
+ } catch {
57
+ // Keep navigation usable when browser storage is unavailable.
58
+ }
59
+ }
@@ -0,0 +1,55 @@
1
+ import { ArrowRight, Sparkles, X } from 'lucide-react'
2
+ import { useState } from 'react'
3
+ import type { SiteAnnouncementProps } from './site-header-types'
4
+
5
+ export function AnnouncementBar({
6
+ actionLabel,
7
+ actionUrl,
8
+ dismissible = true,
9
+ message,
10
+ onDismiss,
11
+ show = true,
12
+ }: SiteAnnouncementProps) {
13
+ const [visible, setVisible] = useState(show)
14
+
15
+ if (!visible) return null
16
+
17
+ function handleDismiss() {
18
+ setVisible(false)
19
+ onDismiss?.()
20
+ }
21
+
22
+ return (
23
+ <div
24
+ aria-label="Announcement banner"
25
+ className="relative flex min-h-9 w-full items-center justify-center bg-primary px-4 py-1.5 text-xs font-medium text-primary-foreground select-none"
26
+ role="region"
27
+ >
28
+ <div className="flex flex-wrap items-center justify-center gap-2 text-center">
29
+ <Sparkles className="size-3.5 shrink-0 opacity-80" />
30
+ <span>{message}</span>
31
+
32
+ {actionLabel && actionUrl && (
33
+ <a
34
+ className="inline-flex items-center gap-1 font-semibold underline underline-offset-4 hover:opacity-90"
35
+ href={actionUrl}
36
+ >
37
+ {actionLabel}
38
+ <ArrowRight className="size-3" />
39
+ </a>
40
+ )}
41
+ </div>
42
+
43
+ {dismissible && (
44
+ <button
45
+ aria-label="Dismiss announcement"
46
+ className="absolute right-2 top-1/2 -translate-y-1/2 rounded p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-foreground"
47
+ type="button"
48
+ onClick={handleDismiss}
49
+ >
50
+ <X className="size-3.5" />
51
+ </button>
52
+ )}
53
+ </div>
54
+ )
55
+ }