this.gui 1.3.40 → 1.3.42

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 (319) hide show
  1. package/dist/init/index.html +27 -0
  2. package/dist/init/package-lock.json +5779 -0
  3. package/dist/init/package.json +24 -0
  4. package/dist/init/src/App.tsx +40 -0
  5. package/dist/init/src/index.css +16 -0
  6. package/dist/init/src/main.tsx +13 -0
  7. package/dist/init/src/router/DerivableRouter.tsx +36 -0
  8. package/dist/init/tsconfig.json +17 -0
  9. package/dist/init/vite.config.ts +11 -0
  10. package/package.json +5 -3
  11. package/src/GUI.tsx +46 -0
  12. package/src/QRouter/QRegistry.tsx +53 -0
  13. package/src/QRouter/QRouter.stories.tsx +31 -0
  14. package/src/QRouter/QRouter.tsx +57 -0
  15. package/src/gui/Theme/GuiProvider.tsx +111 -0
  16. package/src/gui/Theme/Icon/Icon.resolver.tsx +29 -0
  17. package/src/gui/Theme/Icon/Icon.tsx +43 -0
  18. package/src/gui/Theme/Layout/Content/Content.resolver.tsx +0 -0
  19. package/src/gui/Theme/Layout/Content/Content.stories.tsx +88 -0
  20. package/src/gui/Theme/Layout/Content/Content.tsx +53 -0
  21. package/src/gui/Theme/Layout/Content/Content.types.tsx +40 -0
  22. package/src/gui/Theme/Layout/Footer/Footer.resolver.tsx +45 -0
  23. package/src/gui/Theme/Layout/Footer/Footer.stories.tsx +205 -0
  24. package/src/gui/Theme/Layout/Footer/Footer.tsx +337 -0
  25. package/src/gui/Theme/Layout/Footer/Footer.types.ts +40 -0
  26. package/src/gui/Theme/Layout/Layout/Layout.resolver.tsx +37 -0
  27. package/src/gui/Theme/Layout/Layout/Layout.stories.tsx +289 -0
  28. package/src/gui/Theme/Layout/Layout/Layout.tsx +117 -0
  29. package/src/gui/Theme/Layout/Layout/Layout.types.ts +57 -0
  30. package/src/gui/Theme/Layout/Layout/useLayoutBreakpoints.ts +9 -0
  31. package/src/gui/Theme/Layout/Namespace/Namespace.stories.tsx +105 -0
  32. package/src/gui/Theme/Layout/Namespace/Namespace.tsx +26 -0
  33. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.resolver.tsx +87 -0
  34. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.stories.tsx +199 -0
  35. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.tsx +311 -0
  36. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.types.ts +41 -0
  37. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/SidebarToggleButton.tsx +53 -0
  38. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.resolver.tsx +19 -0
  39. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.tsx +107 -0
  40. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.resolver.tsx +0 -0
  41. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.tsx +134 -0
  42. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.types.ts +15 -0
  43. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarMenu/LeftSidebarMenu.tsx +142 -0
  44. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarToggleButton/LeftSidebarToggleButton.tsx +23 -0
  45. package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.resolver.tsx +35 -0
  46. package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.stories.tsx +239 -0
  47. package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.tsx +319 -0
  48. package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.types.ts +17 -0
  49. package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarAction/RightSidebarAction.tsx +102 -0
  50. package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarLink/RightSidebarLink.tsx +132 -0
  51. package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarMenu/RightSidebarMenu.tsx +140 -0
  52. package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarToggleButton/RightSidebarToggleButton.tsx +22 -0
  53. package/src/gui/Theme/Layout/StickyOptions/StickyOptionsTop.stories.tsx +469 -0
  54. package/src/gui/Theme/Layout/StickyOptions/StickyOptionsTop.tsx +489 -0
  55. package/src/gui/Theme/Layout/TopBar/TopBar.resolver.tsx +86 -0
  56. package/src/gui/Theme/Layout/TopBar/TopBar.stories.tsx +350 -0
  57. package/src/gui/Theme/Layout/TopBar/TopBar.tsx +292 -0
  58. package/src/gui/Theme/Layout/TopBar/TopBar.types.ts +39 -0
  59. package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.stories.tsx +83 -0
  60. package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.tsx +18 -0
  61. package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.types.ts +4 -0
  62. package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.stories.tsx +189 -0
  63. package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.tsx +30 -0
  64. package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.types.ts +9 -0
  65. package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.resolver.tsx +14 -0
  66. package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.stories.tsx +56 -0
  67. package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.tsx +123 -0
  68. package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.types.ts +44 -0
  69. package/src/gui/Theme/catalog/CherryByte/CherryByte.png +0 -0
  70. package/src/gui/Theme/catalog/CherryByte/dark.tokens.ts +47 -0
  71. package/src/gui/Theme/catalog/CherryByte/light.tokens.ts +47 -0
  72. package/src/gui/Theme/catalog/CherryByte/manifest.ts +24 -0
  73. package/src/gui/Theme/catalog/GhostShell/dark.tokens.ts +43 -0
  74. package/src/gui/Theme/catalog/GhostShell/ghost.png +0 -0
  75. package/src/gui/Theme/catalog/GhostShell/light.tokens.ts +39 -0
  76. package/src/gui/Theme/catalog/GhostShell/manifest.ts +24 -0
  77. package/src/gui/Theme/catalog/LunaHex/LunaHex.png +0 -0
  78. package/src/gui/Theme/catalog/LunaHex/dark.tokens.ts +34 -0
  79. package/src/gui/Theme/catalog/LunaHex/light.tokens.ts +74 -0
  80. package/src/gui/Theme/catalog/LunaHex/manifest.ts +24 -0
  81. package/src/gui/Theme/catalog/MUI/MUI.png +0 -0
  82. package/src/gui/Theme/catalog/MUI/dark.tokens.ts +58 -0
  83. package/src/gui/Theme/catalog/MUI/light.tokens.ts +74 -0
  84. package/src/gui/Theme/catalog/MUI/manifest.ts +24 -0
  85. package/src/gui/Theme/catalog/PrinceOfDarkness/dark.tokens.ts +48 -0
  86. package/src/gui/Theme/catalog/PrinceOfDarkness/light.tokens.ts +47 -0
  87. package/src/gui/Theme/catalog/PrinceOfDarkness/manifest.ts +24 -0
  88. package/src/gui/Theme/catalog/PrinceOfDarkness/prince.png +0 -0
  89. package/src/gui/Theme/catalog/PrinceOfDarkness/princeOfDarkness.png +0 -0
  90. package/src/gui/Theme/catalog/Seafoam/dark.tokens.ts +49 -0
  91. package/src/gui/Theme/catalog/Seafoam/light.tokens.ts +47 -0
  92. package/src/gui/Theme/catalog/Seafoam/manifest.ts +24 -0
  93. package/src/gui/Theme/catalog/Seafoam/seaFoam.png +0 -0
  94. package/src/gui/Theme/catalog/neurons/dark.tokens.ts +58 -0
  95. package/src/gui/Theme/catalog/neurons/light.tokens.ts +74 -0
  96. package/src/gui/Theme/catalog/neurons/manifest.ts +24 -0
  97. package/src/gui/Theme/catalog/neurons/neurons.me.png +0 -0
  98. package/src/gui/Theme/fromTokens.ts +272 -0
  99. package/src/gui/Theme/gui.css +31 -0
  100. package/src/gui/Theme/index.ts +17 -0
  101. package/src/gui/Theme/styles/buildShadows.ts +83 -0
  102. package/src/gui/Theme/styles/theme.tokens.ts +108 -0
  103. package/src/gui/Theme/utils/catalog.ts +61 -0
  104. package/src/gui/Theme/utils/persistence.ts +66 -0
  105. package/src/gui/Theme/utils/themeUtils.ts +34 -0
  106. package/src/gui/components/atoms/AppBar/AppBar.resolver.tsx +46 -0
  107. package/src/gui/components/atoms/AppBar/AppBar.stories.tsx +251 -0
  108. package/src/gui/components/atoms/AppBar/AppBar.tsx +107 -0
  109. package/src/gui/components/atoms/AppBar/AppBar.types.ts +28 -0
  110. package/src/gui/components/atoms/Avatar/Avatar.resolver.tsx +61 -0
  111. package/src/gui/components/atoms/Avatar/Avatar.stories.tsx +36 -0
  112. package/src/gui/components/atoms/Avatar/Avatar.tsx +14 -0
  113. package/src/gui/components/atoms/Box/Box.resolver.tsx +171 -0
  114. package/src/gui/components/atoms/Box/Box.stories.tsx +263 -0
  115. package/src/gui/components/atoms/Box/Box.tsx +15 -0
  116. package/src/gui/components/atoms/Button/Button.resolver.tsx +103 -0
  117. package/src/gui/components/atoms/Button/Button.stories.tsx +219 -0
  118. package/src/gui/components/atoms/Button/Button.tsx +40 -0
  119. package/src/gui/components/atoms/Card/Card.resolver.tsx +63 -0
  120. package/src/gui/components/atoms/Card/Card.stories.tsx +54 -0
  121. package/src/gui/components/atoms/Card/Card.tsx +13 -0
  122. package/src/gui/components/atoms/CardActions/CardActions.resolver.tsx +59 -0
  123. package/src/gui/components/atoms/CardActions/CardActions.stories.tsx +32 -0
  124. package/src/gui/components/atoms/CardActions/CardActions.tsx +14 -0
  125. package/src/gui/components/atoms/CardContent/CardContent.resolver.tsx +60 -0
  126. package/src/gui/components/atoms/CardContent/CardContent.stories.tsx +34 -0
  127. package/src/gui/components/atoms/CardContent/CardContent.tsx +13 -0
  128. package/src/gui/components/atoms/CardHeader/CardHeader.resolver.tsx +68 -0
  129. package/src/gui/components/atoms/CardHeader/CardHeader.stories.tsx +40 -0
  130. package/src/gui/components/atoms/CardHeader/CardHeader.tsx +12 -0
  131. package/src/gui/components/atoms/Collapse/Collapse.resolver.tsx +85 -0
  132. package/src/gui/components/atoms/Collapse/Collapse.stories.tsx +130 -0
  133. package/src/gui/components/atoms/Collapse/Collapse.tsx +17 -0
  134. package/src/gui/components/atoms/Divider/Divider.resolver.tsx +95 -0
  135. package/src/gui/components/atoms/Divider/Divider.stories.tsx +108 -0
  136. package/src/gui/components/atoms/Divider/Divider.tsx +14 -0
  137. package/src/gui/components/atoms/Drawer/Drawer.resolver.tsx +116 -0
  138. package/src/gui/components/atoms/Drawer/Drawer.stories.tsx +223 -0
  139. package/src/gui/components/atoms/Drawer/Drawer.tsx +25 -0
  140. package/src/gui/components/atoms/Grid/Grid.resolver.tsx +33 -0
  141. package/src/gui/components/atoms/Grid/Grid.stories.tsx +136 -0
  142. package/src/gui/components/atoms/Grid/Grid.tsx +15 -0
  143. package/src/gui/components/atoms/Grid/Grid.types.ts +9 -0
  144. package/src/gui/components/atoms/IconButton/IconButton.resolver.tsx +137 -0
  145. package/src/gui/components/atoms/IconButton/IconButton.stories.tsx +134 -0
  146. package/src/gui/components/atoms/IconButton/IconButton.tsx +22 -0
  147. package/src/gui/components/atoms/Link/Link.resolver.tsx +74 -0
  148. package/src/gui/components/atoms/Link/Link.stories.tsx +157 -0
  149. package/src/gui/components/atoms/Link/Link.tsx +36 -0
  150. package/src/gui/components/atoms/List/List.resolver.tsx +94 -0
  151. package/src/gui/components/atoms/List/List.stories.tsx +137 -0
  152. package/src/gui/components/atoms/List/List.tsx +20 -0
  153. package/src/gui/components/atoms/ListItem/ListItem.resolver.tsx +88 -0
  154. package/src/gui/components/atoms/ListItem/ListItem.stories.tsx +151 -0
  155. package/src/gui/components/atoms/ListItem/ListItem.tsx +19 -0
  156. package/src/gui/components/atoms/ListItemButton/ListItemButton.resolver.tsx +214 -0
  157. package/src/gui/components/atoms/ListItemButton/ListItemButton.stories.tsx +155 -0
  158. package/src/gui/components/atoms/ListItemButton/ListItemButton.tsx +15 -0
  159. package/src/gui/components/atoms/ListItemIcon/ListItemIcon.resolver.tsx +102 -0
  160. package/src/gui/components/atoms/ListItemIcon/ListItemIcon.stories.tsx +132 -0
  161. package/src/gui/components/atoms/ListItemIcon/ListItemIcon.tsx +11 -0
  162. package/src/gui/components/atoms/ListItemText/ListItemText.resolver.tsx +112 -0
  163. package/src/gui/components/atoms/ListItemText/ListItemText.stories.tsx +156 -0
  164. package/src/gui/components/atoms/ListItemText/ListItemText.tsx +15 -0
  165. package/src/gui/components/atoms/Menu/Menu.resolver.tsx +112 -0
  166. package/src/gui/components/atoms/Menu/Menu.stories.tsx +162 -0
  167. package/src/gui/components/atoms/Menu/Menu.tsx +17 -0
  168. package/src/gui/components/atoms/MenuItem/MenuItem.resolver.tsx +183 -0
  169. package/src/gui/components/atoms/MenuItem/MenuItem.stories.tsx +134 -0
  170. package/src/gui/components/atoms/MenuItem/MenuItem.tsx +14 -0
  171. package/src/gui/components/atoms/Paper/Paper.resolver.tsx +98 -0
  172. package/src/gui/components/atoms/Paper/Paper.stories.tsx +184 -0
  173. package/src/gui/components/atoms/Paper/Paper.tsx +15 -0
  174. package/src/gui/components/atoms/Section/Section.resolver.tsx +10 -0
  175. package/src/gui/components/atoms/Section/Section.stories.tsx +189 -0
  176. package/src/gui/components/atoms/Section/Section.tsx +76 -0
  177. package/src/gui/components/atoms/Section/Section.types.tsx +24 -0
  178. package/src/gui/components/atoms/Stack/Stack.resolver.tsx +94 -0
  179. package/src/gui/components/atoms/Stack/Stack.stories.tsx +160 -0
  180. package/src/gui/components/atoms/Stack/Stack.tsx +15 -0
  181. package/src/gui/components/atoms/Surface/Surface.resolver.tsx +37 -0
  182. package/src/gui/components/atoms/Surface/Surface.tsx +49 -0
  183. package/src/gui/components/atoms/Surface/Surface.types.ts +20 -0
  184. package/src/gui/components/atoms/Switch/Switch.resolver.tsx +53 -0
  185. package/src/gui/components/atoms/Switch/Switch.stories.tsx +236 -0
  186. package/src/gui/components/atoms/Switch/Switch.tsx +22 -0
  187. package/src/gui/components/atoms/Table/Body/TableBody.tsx +7 -0
  188. package/src/gui/components/atoms/Table/Cell/TableCell.tsx +18 -0
  189. package/src/gui/components/atoms/Table/Head/TableHead.tsx +9 -0
  190. package/src/gui/components/atoms/Table/Row/TableRow.tsx +20 -0
  191. package/src/gui/components/atoms/Table/Table.resolver.tsx +77 -0
  192. package/src/gui/components/atoms/Table/Table.stories.tsx +173 -0
  193. package/src/gui/components/atoms/Table/Table.tsx +20 -0
  194. package/src/gui/components/atoms/TextField/TextField.stories.tsx +25 -0
  195. package/src/gui/components/atoms/TextField/TextField.tsx +15 -0
  196. package/src/gui/components/atoms/Toolbar/Toolbar.resolver.tsx +60 -0
  197. package/src/gui/components/atoms/Toolbar/Toolbar.stories.tsx +155 -0
  198. package/src/gui/components/atoms/Toolbar/Toolbar.tsx +16 -0
  199. package/src/gui/components/atoms/Tooltip/Tooltip.resolver.tsx +142 -0
  200. package/src/gui/components/atoms/Tooltip/Tooltip.stories.tsx +117 -0
  201. package/src/gui/components/atoms/Tooltip/Tooltip.tsx +70 -0
  202. package/src/gui/components/atoms/Typography/Typography.resolver.tsx +158 -0
  203. package/src/gui/components/atoms/Typography/Typography.stories.tsx +222 -0
  204. package/src/gui/components/atoms/Typography/Typography.tsx +27 -0
  205. package/src/gui/components/atoms/Window/Nodes/node.ts +0 -0
  206. package/src/gui/components/atoms/Window/code/block/node.tsx +0 -0
  207. package/src/gui/components/atoms/Window/code/hugging.face.api.ts +11 -0
  208. package/src/gui/components/atoms/Window/connectors/index.ts +19 -0
  209. package/src/gui/components/atoms/Window/window.stories.tsx +20 -0
  210. package/src/gui/components/atoms/Window/window.tsx +636 -0
  211. package/src/gui/components/atoms/atoms.tsx +151 -0
  212. package/src/gui/components/atoms/index.ts +2 -0
  213. package/src/gui/components/generics/Cards/Gridme.jsx +52 -0
  214. package/src/gui/components/generics/Cards/LilBox.jsx +65 -0
  215. package/src/gui/components/generics/Cards/ModuleCard.jsx +106 -0
  216. package/src/gui/components/generics/Chats/FullChatBot.jsx +223 -0
  217. package/src/gui/components/generics/Code/CodeBlock.jsx +33 -0
  218. package/src/gui/components/generics/EmojiCursor/EmojiCursor.stories.tsx +153 -0
  219. package/src/gui/components/generics/EmojiCursor/EmojiCursor.tsx +23 -0
  220. package/src/gui/components/generics/Feedback/Callout.jsx +92 -0
  221. package/src/gui/components/generics/Layout/GridX.jsx +29 -0
  222. package/src/gui/components/generics/Layout/Hero2.jsx +132 -0
  223. package/src/gui/components/generics/Layout/PageContainer.jsx +29 -0
  224. package/src/gui/components/generics/Layout/PageDivider.jsx +20 -0
  225. package/src/gui/components/generics/Layout/Section.jsx +43 -0
  226. package/src/gui/components/generics/Layout/SectionHeader.jsx +21 -0
  227. package/src/gui/components/generics/Media/Img.jsx +58 -0
  228. package/src/gui/components/generics/Media/VideoEmbed.jsx +51 -0
  229. package/src/gui/components/generics/Organization/TableOfContents.jsx +51 -0
  230. package/src/gui/components/generics/Organization/Tabs.jsx +45 -0
  231. package/src/gui/components/generics/Text/TextList.jsx +41 -0
  232. package/src/gui/components/generics/Text/TextParagraph.jsx +28 -0
  233. package/src/gui/components/generics/Text/TextQuote.jsx +23 -0
  234. package/src/gui/components/generics/Text/TextTitle.jsx +44 -0
  235. package/src/gui/components/molecules/Dialog/Dialog.stories.tsx +18 -0
  236. package/src/gui/components/molecules/Dialog/Dialog.tsx +5 -0
  237. package/src/gui/components/molecules/Hero/Hero.stories.tsx +140 -0
  238. package/src/gui/components/molecules/Hero/Hero.tsx +152 -0
  239. package/src/gui/components/molecules/Hero/Hero.types.tsx +18 -0
  240. package/src/gui/components/molecules/Modal/Modal.resolver.tsx +38 -0
  241. package/src/gui/components/molecules/Modal/Modal.stories.tsx +82 -0
  242. package/src/gui/components/molecules/Modal/Modal.tsx +110 -0
  243. package/src/gui/components/molecules/Modal/Modal.types.ts +29 -0
  244. package/src/gui/components/molecules/Page/Page.stories.tsx +135 -0
  245. package/src/gui/components/molecules/Page/Page.tsx +94 -0
  246. package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.resolver.tsx +58 -0
  247. package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.stories.tsx +133 -0
  248. package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.tsx +101 -0
  249. package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.types.ts +29 -0
  250. package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.resolver.tsx +15 -0
  251. package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.stories.tsx +88 -0
  252. package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.tsx +167 -0
  253. package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.types.ts +34 -0
  254. package/src/gui/components/molecules/molecules.ts +49 -0
  255. package/src/gui/components/organisms/Blockchain/Blocks/BlocksTable.tsx +119 -0
  256. package/src/gui/components/organisms/Blockchain/Usernames/Identities.stories.tsx +20 -0
  257. package/src/gui/components/organisms/Blockchain/Usernames/QR.tsx +566 -0
  258. package/src/gui/components/organisms/Blockchain/Usernames/Usernames.tsx +448 -0
  259. package/src/gui/components/organisms/Blockchain/Usernames/identities.tsx +710 -0
  260. package/src/gui/components/organisms/Blockchain/blockchain.stories.tsx +17 -0
  261. package/src/gui/components/organisms/Blockchain/blockchain.tsx +368 -0
  262. package/src/gui/components/organisms/Blockchain/scripts/connection.ts +82 -0
  263. package/src/gui/components/organisms/Blockchain/scripts/match_face.ts +143 -0
  264. package/src/gui/components/organisms/HighLighter/HighLighter.stories.tsx +168 -0
  265. package/src/gui/components/organisms/HighLighter/HighLighter.tsx +420 -0
  266. package/src/gui/components/organisms/HighLighter/HighLightsDrawer.tsx +197 -0
  267. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/FaceRecognition.stories.tsx +312 -0
  268. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/FaceRecognition.tsx +765 -0
  269. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceCameraPermission.ts +70 -0
  270. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceLandmarker.ts +106 -0
  271. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceOverlay.ts +489 -0
  272. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceTemplate.ts +32 -0
  273. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceTemplateBurst.ts +178 -0
  274. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/verifyTemplate.ts +136 -0
  275. package/src/gui/components/organisms/IdentityNoise/IdentityNoise.tsx +403 -0
  276. package/src/gui/components/organisms/IdentityNoise/IndentityNoise.stories.tsx +15 -0
  277. package/src/gui/components/organisms/IdentityNoise/Noise/Noise.stories.tsx +206 -0
  278. package/src/gui/components/organisms/IdentityNoise/Noise/Noise.tsx +394 -0
  279. package/src/gui/components/organisms/IdentityNoise/Triad/QR.tsx +566 -0
  280. package/src/gui/components/organisms/IdentityNoise/Triad/Tiad.stories.tsx +6 -0
  281. package/src/gui/components/organisms/IdentityNoise/Triad/Triad.tsx +917 -0
  282. package/src/gui/components/organisms/IdentityNoise/Triad/handleCleak.ts +0 -0
  283. package/src/gui/components/organisms/IdentityNoise/Triad/identity.ts +31 -0
  284. package/src/gui/components/organisms/IdentityNoise/Triad/me/fundamentals/vectors/vectors.tsx +252 -0
  285. package/src/gui/components/organisms/IdentityNoise/Triad/me/me.stories.tsx +314 -0
  286. package/src/gui/components/organisms/IdentityNoise/Triad/me/me.tsx +0 -0
  287. package/src/gui/components/organisms/organisms.ts +15 -0
  288. package/src/gui/contexts/InsetsContext.tsx +40 -0
  289. package/src/gui/contexts/LeftSidebarContext.tsx +20 -0
  290. package/src/gui/contexts/RightSidebarContext.tsx +25 -0
  291. package/src/gui/contexts/ThemeContext.ts +34 -0
  292. package/src/gui/contexts/index.ts +4 -0
  293. package/src/gui/hooks/index.ts +11 -0
  294. package/src/gui/hooks/resolveColorToken.ts +39 -0
  295. package/src/gui/hooks/useCodeGen.ts +12 -0
  296. package/src/gui/hooks/useGuiMediaQuery.ts +18 -0
  297. package/src/gui/hooks/useGuiTheme.ts +18 -0
  298. package/src/gui/hooks/useInsets.ts +26 -0
  299. package/src/gui/hooks/useIsMobile.ts +13 -0
  300. package/src/gui/hooks/useIsTouchDevice.ts +25 -0
  301. package/src/gui/hooks/useLeftSidebar.ts +10 -0
  302. package/src/gui/hooks/useRightSidebar.ts +12 -0
  303. package/src/gui/hooks/useViewportKey.ts +19 -0
  304. package/src/gui/hooks/useViewportProp.ts +17 -0
  305. package/src/gui/registry/GuiRegistry.ts +19 -0
  306. package/src/gui/registry/factory.ts +12 -0
  307. package/src/gui/registry/index.ts +3 -0
  308. package/src/gui/registry/types.ts +6 -0
  309. package/src/gui/utils/nodeID.ts +11 -0
  310. package/src/registry/GuiRegistry.ts +19 -0
  311. package/src/stories/01.Home.mdx +22 -0
  312. package/src/stories/02.Understanding.This.GUI.mdx +149 -0
  313. package/src/stories/Theme/Palette.stories.tsx +86 -0
  314. package/src/stories/Theme/ThemeViewer.stories.tsx +91 -0
  315. package/src/stories/Theme/Typography.stories.jsx +211 -0
  316. package/src/stories/assets/this.GUI.png +0 -0
  317. package/src/types/gui.d.ts +67 -0
  318. package/src/types/theme.d.ts +191 -0
  319. package/src/types/viewport.ts +132 -0
@@ -0,0 +1,25 @@
1
+ import React, { createContext, useState } from 'react';
2
+
3
+ export type RightSidebarView = 'rail' | 'expanded' | 'mobile';
4
+
5
+ export type RightSidebarContextType = {
6
+ view: RightSidebarView;
7
+ setView: (view: RightSidebarView) => void;
8
+ };
9
+
10
+ export const RightSidebarContext = createContext<RightSidebarContextType | undefined>(undefined);
11
+
12
+ export const RightSidebarProvider: React.FC<{ children: React.ReactNode; initialView?: RightSidebarView }> = ({
13
+ children,
14
+ initialView = 'rail',
15
+ }) => {
16
+ const [view, setView] = useState<RightSidebarView>(initialView);
17
+
18
+ return (
19
+ <RightSidebarContext.Provider value={{ view, setView }}>
20
+ {children}
21
+ </RightSidebarContext.Provider>
22
+ );
23
+ };
24
+
25
+ export default RightSidebarProvider;
@@ -0,0 +1,34 @@
1
+ //src/themes/utils/themeContext.ts
2
+ import React, { createContext, useContext } from 'react';
3
+ import type { GuiContextValue } from '@/types/theme';
4
+ /**
5
+ * ThemeContext
6
+ * ------------
7
+ * Provides access to the GUI theme context (`GuiContextValue`) throughout the application.
8
+ *
9
+ * This context is intended to be consumed by components that need to access or manipulate:
10
+ * - the current theme key (e.g., 'neurons-light')
11
+ * - the selected family and mode
12
+ * - available themes
13
+ * - helper actions like `toggleMode`, `setMode`, etc.
14
+ *
15
+ * The context value is expected to be provided by `GuiProvider`, which wraps the app.
16
+ */
17
+ export const ThemeContext = createContext<GuiContextValue | undefined>(undefined);
18
+ /**
19
+ * useThemeContext
20
+ * ---------------
21
+ * Custom hook to access the GUI theme context.
22
+ *
23
+ * This hook ensures that it is only used within the `GuiProvider` tree.
24
+ * If accessed outside the provider, it throws an error to help with debugging.
25
+ *
26
+ * @returns {GuiContextValue} - The full GUI theme context state and helpers.
27
+ */
28
+ export const useThemeContext = (): GuiContextValue => {
29
+ const context = useContext(ThemeContext);
30
+ if (!context) {
31
+ throw new Error('useThemeContext must be used within a GuiProvider');
32
+ }
33
+ return context;
34
+ };
@@ -0,0 +1,4 @@
1
+ export * from './InsetsContext';
2
+ export * from './LeftSidebarContext';
3
+ export * from './RightSidebarContext';
4
+ export * from './ThemeContext';
@@ -0,0 +1,11 @@
1
+ // src/gui/hooks_index.ts
2
+ export * from './useGuiMediaQuery';
3
+ export * from './useGuiTheme';
4
+ export * from './resolveColorToken';
5
+ export * from './useInsets';
6
+ export * from './useIsMobile';
7
+ export * from './useIsTouchDevice';
8
+ export * from './useViewportKey';
9
+ export * from './useViewportProp';
10
+ export * from './useLeftSidebar';
11
+ export * from './useRightSidebar';
@@ -0,0 +1,39 @@
1
+ //@/gui/hooks/resolveColorToken.ts
2
+ /**
3
+ * Resolves a color token to a valid CSS color string.
4
+ *
5
+ * Supports raw CSS colors (e.g., '#fff', 'rgb(...)', 'hsl(...)'),
6
+ * and theme palette tokens such as 'primary.main', 'text.secondary', etc.
7
+ * Falls back to the raw token or undefined if it cannot be resolved.
8
+ *
9
+ * @param token - The color token or raw color string to resolve.
10
+ * @param theme - Optional MUI Theme object to resolve from. Defaults to useTheme() if not provided.
11
+ * @returns A resolved color string or undefined.
12
+ */
13
+ import { useTheme } from '@mui/material/styles';
14
+ import type { Theme } from '@mui/material/styles';
15
+
16
+ export function resolveColorToken(token?: string, theme?: Theme): string | undefined {
17
+ if (!token) return undefined;
18
+ const resolvedTheme = theme ?? useTheme();
19
+ const pal: any = resolvedTheme?.palette ?? {};
20
+
21
+ // If raw CSS color (e.g. #fff, rgb(...), etc), return as is
22
+ if (/^#|^rgb\(|^hsl\(/i.test(token)) return token;
23
+
24
+ // If dot notation, try to resolve from palette (e.g., text.secondary)
25
+ if (token.includes('.')) {
26
+ const v = token.split('.').reduce<any>((acc, k) => (acc ? acc[k] : undefined), pal);
27
+ if (typeof v === 'string') return v;
28
+ if (v && typeof v === 'object') return v.main ?? v.default;
29
+ return undefined;
30
+ }
31
+
32
+ // Otherwise, try direct access (e.g., 'primary', 'secondary')
33
+ const v = pal[token];
34
+ if (typeof v === 'string') return v;
35
+ if (v && typeof v === 'object') return v.main ?? v.default;
36
+ return undefined;
37
+ }
38
+
39
+ export default resolveColorToken;
@@ -0,0 +1,12 @@
1
+ import { useCallback } from "react";
2
+ export function useCodeGen() {
3
+ const generate = useCallback(async (type: string, payload: any) => {
4
+ console.log(`[CodeGen] Request: ${type}`, payload);
5
+ // For now, fake output:
6
+ return `Generated mock output for: ${payload.prompt}`;
7
+ }, []);
8
+
9
+ return { generate };
10
+ }
11
+
12
+ export default useCodeGen;
@@ -0,0 +1,18 @@
1
+ // src/gui/hooks/useGuiMediaQuery.ts
2
+ import { useTheme } from '@mui/material/styles';
3
+ import useMediaQuery from '@mui/material/useMediaQuery';
4
+ /**
5
+ * Wrapper around MUI's useMediaQuery that accepts either a string or a function
6
+ * returning a string based on the theme. This allows using theme breakpoints
7
+ * easily within the media query.
8
+ *
9
+ * @param query - The media query string or a function that takes the theme and returns a string.
10
+ * @returns A boolean indicating whether the document matches the media query.
11
+ */
12
+ export function useGuiMediaQuery(query: string | ((theme: ReturnType<typeof useTheme>) => string)) {
13
+ const theme = useTheme();
14
+ const finalQuery = typeof query === 'function' ? query(theme) : query;
15
+ return useMediaQuery(finalQuery);
16
+ }
17
+
18
+ export default useGuiMediaQuery;
@@ -0,0 +1,18 @@
1
+ //@/gui/hooks/useTheme.ts
2
+ /**
3
+ * React hook wrapper for MUI's `useTheme`.
4
+ *
5
+ * This wrapper ensures consistent typing across your app by casting the returned theme
6
+ * as the expected MUI `Theme`. It allows your components to remain decoupled from direct MUI imports,
7
+ * making future migration or customization easier.
8
+ */
9
+ import { useTheme } from '@mui/material/styles';
10
+ import type { Theme } from '@mui/material/styles';
11
+ /**
12
+ * Returns the current theme typed as MUI's `Theme`.
13
+ */
14
+ export function useGuiTheme(): Theme {
15
+ return useTheme() as Theme;
16
+ }
17
+
18
+ export default useGuiTheme;
@@ -0,0 +1,26 @@
1
+ //@/gui/hooks/useInsets.ts
2
+ import { useContext } from 'react';
3
+ import { useGuiTheme } from '@/gui/hooks';
4
+ import { InsetsContext } from '@/gui/contexts';
5
+ /**
6
+ * Returns the current insets from the InsetsContext when available.
7
+ * Falls back to the theme's static layout insets if the provider is missing.
8
+ */
9
+ export function useInsets() {
10
+ const theme = useGuiTheme();
11
+ const context = useContext(InsetsContext);
12
+ if (context) return context.insets;
13
+ const fallback = theme.layout?.insets ?? { top: 0, right: 0, bottom: 0, left: 0 };
14
+ return { nav: 0, ...fallback };
15
+ }
16
+ /**
17
+ * Returns the updater function for insets, defaulting to a no-op if unavailable.
18
+ */
19
+ export function useUpdateInsets() {
20
+ const theme = useGuiTheme() as any;
21
+ const context = useContext(InsetsContext);
22
+ if (context) return context.updateInsets;
23
+ return typeof theme.updateInsets === 'function' ? theme.updateInsets : () => {};
24
+ }
25
+
26
+ export default useInsets;
@@ -0,0 +1,13 @@
1
+ //@/gui/hooks/useIsMobile.ts
2
+ import { useTheme } from '@mui/material/styles';
3
+ import useMediaQuery from '@mui/material/useMediaQuery';
4
+ /**
5
+ * Returns `true` if the viewport width is at or below the "sm" breakpoint (mobile).
6
+ * Abstracts the mobile detection logic away from MUI internals.
7
+ */
8
+ export function useIsMobile(): boolean {
9
+ const theme = useTheme();
10
+ return useMediaQuery(theme.breakpoints.down('sm'));
11
+ }
12
+
13
+ export default useIsMobile;
@@ -0,0 +1,25 @@
1
+ // src/gui/hooks/useIsTouchDevice.ts
2
+
3
+ /**
4
+ * useIsTouchDevice
5
+ * ---------------
6
+ * Hook that determines whether the current device supports touch events.
7
+ * Useful for adapting UI behavior depending on touch capabilities.
8
+ */
9
+
10
+ import { useEffect, useState } from 'react';
11
+
12
+ export function useIsTouchDevice(): boolean {
13
+ const [isTouch, setIsTouch] = useState(false);
14
+
15
+ useEffect(() => {
16
+ const hasTouchSupport =
17
+ typeof window !== 'undefined' &&
18
+ ('ontouchstart' in window || navigator.maxTouchPoints > 0);
19
+ setIsTouch(hasTouchSupport);
20
+ }, []);
21
+
22
+ return isTouch;
23
+ }
24
+
25
+ export default useIsTouchDevice;
@@ -0,0 +1,10 @@
1
+ import { useContext } from "react";
2
+
3
+ import { LeftSidebarContext } from "@/gui/contexts";
4
+ export const useLeftSidebar = () => {
5
+ const context = useContext(LeftSidebarContext);
6
+ if (!context) {
7
+ throw new Error('useLeftSidebar must be used within a SidebarProvider');
8
+ }
9
+ return context;
10
+ };
@@ -0,0 +1,12 @@
1
+ import { useContext } from 'react';
2
+ import { RightSidebarContext } from '@/gui/contexts';
3
+
4
+ export const useRightSidebar = () => {
5
+ const context = useContext(RightSidebarContext);
6
+ if (!context) {
7
+ throw new Error('useRightSidebar must be used within a RightSidebarProvider');
8
+ }
9
+ return context;
10
+ };
11
+
12
+ export default useRightSidebar;
@@ -0,0 +1,19 @@
1
+ //@/gui/hooks/useViewportKey.ts
2
+ /**
3
+ * Hook that returns the current viewport key ('xs', 'sm', 'md', 'lg', or 'xl')
4
+ * based on the browser's window.innerWidth and the theme's breakpoints.
5
+ * Useful for conditional rendering or styling based on screen size.
6
+ */
7
+ import { useTheme } from '@mui/material/styles';
8
+ export function useViewportKey(): 'xs' | 'sm' | 'md' | 'lg' | 'xl' {
9
+ const theme = useTheme();
10
+ const width = typeof window !== 'undefined' ? window.innerWidth : 0;
11
+ const breakpoints = theme.breakpoints.values;
12
+ if (width < breakpoints.sm) return 'xs';
13
+ if (width < breakpoints.md) return 'sm';
14
+ if (width < breakpoints.lg) return 'md';
15
+ if (width < breakpoints.xl) return 'lg';
16
+ return 'xl';
17
+ }
18
+
19
+ export default useViewportKey;
@@ -0,0 +1,17 @@
1
+ //@/gui/hooks/useViewportProp.ts
2
+ import { useTheme } from '@mui/material/styles';
3
+ import { resolveViewportProp } from '@/types/viewport';
4
+ /**
5
+ * useViewportProp allows you to pass responsive props as objects (e.g., { sm: 'value', md: 'value' })
6
+ * and resolves the appropriate value based on the current screen width and theme breakpoints.
7
+ * This helps in adapting component behavior or styling dynamically based on the viewport.
8
+ */
9
+ export function useViewportProp<T extends string | number | boolean | object>(
10
+ prop: T | Partial<Record<'xs' | 'sm' | 'md' | 'lg' | 'xl', T>> & { default?: T },
11
+ opts?: { widthOverride?: number }
12
+ ): T | undefined {
13
+ const theme = useTheme();
14
+ return resolveViewportProp(prop as any, theme, opts);
15
+ }
16
+
17
+ export default useViewportProp;
@@ -0,0 +1,19 @@
1
+ import { createRegistry } from "./factory";
2
+ import ButtonResolver from "../atoms/Button/Button.resolver";
3
+ import LinkResolver from "../atoms/Link/Link.resolver";
4
+ import TypographyResolver from "@/gui/atoms/Typography/Typography.resolver";
5
+ import DrawerResolver from "@/gui/atoms/Drawer/Drawer.resolver";
6
+ import NavBarResolver from "@/gui/Theme/Layout/TopBar/TopBar.resolver";
7
+ import FooterResolver from "@/gui/Layouts/ResponsiveUI/Footer/Footer.resolver";
8
+ // etc...
9
+ export const GuiRegistry = createRegistry([
10
+ //Atoms
11
+ ButtonResolver,
12
+ TypographyResolver,
13
+ LinkResolver,
14
+ DrawerResolver,
15
+ //Molecules
16
+ NavBarResolver,
17
+ FooterResolver,
18
+ // ...
19
+ ]);
@@ -0,0 +1,12 @@
1
+ import type { RegistryEntry, GuiRegistry } from "./types";
2
+
3
+ export function createRegistry(entries: RegistryEntry[]): GuiRegistry {
4
+ return entries.reduce<GuiRegistry>((acc, e) => {
5
+ acc[e.type] = e;
6
+ return acc;
7
+ }, {} as GuiRegistry);
8
+ }
9
+
10
+ export function extendRegistry(base: GuiRegistry, entries: RegistryEntry[]): GuiRegistry {
11
+ return { ...base, ...createRegistry(entries) };
12
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./factory";
3
+ export { GuiRegistry } from "./GuiRegistry";
@@ -0,0 +1,6 @@
1
+ import type * as React from "react";
2
+ export type RegistryEntry = {
3
+ type: string;
4
+ resolve: (spec: any, ctx?: ResolveCtx) => React.ReactElement | null;};
5
+ export type GuiRegistry = Record<string, RegistryEntry>;
6
+ export type ResolveCtx = { theme?: any; [key: string]: any };
@@ -0,0 +1,11 @@
1
+ // src/gui/utils/nodeID.ts
2
+ // Utility to ensure a unique node ID for each component in DOM.
3
+ // using crypto.randomUUID if available
4
+ // otherwise falling back to Math.random.
5
+ export function ensureNodeId(type: string, providedId?: string): string {
6
+ if (providedId) return providedId;
7
+ if (typeof crypto !== 'undefined' && crypto.randomUUID) {
8
+ return `${type}-${crypto.randomUUID()}`;
9
+ }
10
+ return `${type}-${Math.random().toString(36).slice(2)}`;
11
+ }
@@ -0,0 +1,19 @@
1
+ import { createRegistry } from "./factory";
2
+ import ButtonResolver from "../atoms/Button/Button.resolver";
3
+ import LinkResolver from "../atoms/Link/Link.resolver";
4
+ import TypographyResolver from "@/gui/atoms/Typography/Typography.resolver";
5
+ import DrawerResolver from "@/gui/atoms/Drawer/Drawer.resolver";
6
+ import NavBarResolver from "@/gui/Theme/Layout/TopBar/TopBar.resolver";
7
+ import FooterResolver from "@/gui/Layouts/ResponsiveUI/Footer/Footer.resolver";
8
+ // etc...
9
+ export const GuiRegistry = createRegistry([
10
+ //Atoms
11
+ ButtonResolver,
12
+ TypographyResolver,
13
+ LinkResolver,
14
+ DrawerResolver,
15
+ //Molecules
16
+ NavBarResolver,
17
+ FooterResolver,
18
+ // ...
19
+ ]);
@@ -0,0 +1,22 @@
1
+ <div
2
+ style={{
3
+ display: 'flex',
4
+ flexDirection: 'column',
5
+ alignItems: 'center',
6
+ justifyContent: 'center',
7
+ minHeight: '70vh',
8
+ background: 'var(--gui-bg-default)',
9
+ color: 'var(--gui-text-primary)',
10
+ padding: '40px',
11
+ }}
12
+ >
13
+ <img
14
+ src="/GUI.png"
15
+ alt="This.GUI"
16
+ style={{ width: '377px', height: 'auto', imageRendering: 'auto', marginBottom: '10px', marginTop: '-34px' }}
17
+ />
18
+ <h1 style={{ fontSize: '4rem', margin: '0 0 5px 0' }}>.GUI</h1>
19
+ <div style={{ maxWidth: '600px', textAlign: 'center', fontSize: '1.2rem', lineHeight: '1.3', marginTop: '-8px' }}>
20
+ A collection of components and building blocks for the <a href="https://neurons.me" target="_blank" rel="noopener noreferrer">neurons.me</a> environment, enabling declarative GUI generation powered by AI.
21
+ </div>
22
+ </div>
@@ -0,0 +1,149 @@
1
+ # Declarative GUI with `this.GUI`
2
+ `this.GUI` is designed as a **declarative layout system**, where all building blocks (NavBar, Drawers, StickyOptions, Footer) expose **clear JSON-friendly props**.
3
+ This **allows UIs to be described** and even generated by tools like **LLMs**, using nothing more than structured data.
4
+
5
+ ---
6
+
7
+ ## 🔑 Core Idea
8
+ - Every component exposes a **schema-like props API**.
9
+ - Layout respects **insets** (nav height, drawer widths) reported into the theme via `CustomThemeProvider`.
10
+ - The provider also mirrors these values into CSS variables (`--gui-inset-left`, `--gui-inset-right`, `--gui-nav-height`).
11
+ - With this contract, GUIs can be built from **JSON specs** instead of imperative React code.
12
+
13
+ Example JSON spec:
14
+
15
+ ```json
16
+ {
17
+ "route": "/dashboard",
18
+ "layout": {
19
+ "navbar": { "title": "Dashboard", "position": "fixed" },
20
+ "stickyOptions": {
21
+ "items": [
22
+ { "icon": "mui:BarChart", "label": "Stats", "href": "/stats" },
23
+ { "icon": "lucide:bolt", "label": "Power", "href": "/power" }
24
+ ]
25
+ },
26
+ "drawerLeft": { "title": "Menu", "items": [...] },
27
+ "drawerRight": { "title": "Context", "items": [...] },
28
+ "footer": { "text": "© 2025 neurons.me" }
29
+ }
30
+ }
31
+
32
+ Your renderer simply hydrates this into React components.
33
+
34
+
35
+ ---
36
+
37
+ ## 📦 Components
38
+
39
+ ### NavBar
40
+
41
+ **Props:**
42
+ - `title`: string
43
+ - `logo`: string (URL)
44
+ - `NavBarLinks`: array of `{ label, href, icon?, children? }`
45
+ - `position`: `"fixed"` | `"static"` | `"sticky"` (default: `"fixed"`)
46
+ - `showMenuButton`, `showThemeToggle`
47
+
48
+ NavBar measures its height and updates `theme.layout.insets.nav`.
49
+
50
+ ```jsx
51
+ <NavBar title="Demo" position="fixed" />
52
+ ```
53
+
54
+ ---
55
+
56
+ ### LeftDrawer & RightDrawer
57
+
58
+ **Props:**
59
+ - `drawerWidth`: number (default: 260)
60
+ - `variant`: `"permanent"` | `"temporary"` (auto-chooses based on screen size)
61
+ - `title`: optional with label + icon
62
+
63
+ Each drawer updates `theme.layout.insets.left` or `theme.layout.insets.right` when permanent.
64
+
65
+ ```jsx
66
+ <LeftDrawer title="Menu" items={[{ icon: 'mui:Home', label: 'Home' }]} />
67
+ <RightDrawer title="Context" items={[{ icon: 'mui:Info', label: 'Details' }]} />
68
+ ```
69
+
70
+ ---
71
+
72
+ ### StickyOptionsTop
73
+
74
+ Compact quick-actions bar that lives under the NavBar.
75
+
76
+ **Props:**
77
+ - `items`: actions `{ icon, label?, href?, iconColor?, variant? }`
78
+ - `positioning`: `{ mode: 'sticky' | 'fixed', topOffset, reserveSpace }`
79
+ - `mobileVariant`: `"auto"` | `"fab"` | `"inline"`
80
+ - `dense`: boolean
81
+
82
+ ```jsx
83
+ <StickyOptionsTop
84
+ items={[
85
+ { icon: 'mui:Settings', label: 'Settings', href: '/settings' },
86
+ { icon: 'lucide:bolt', label: 'Power', href: '/power', iconColor: 'primary' }
87
+ ]}
88
+ positioning={{ mode: 'sticky' }}
89
+ />
90
+ ```
91
+
92
+ ---
93
+
94
+ ### Footer
95
+
96
+ **Props:**
97
+ - `text`: string or ReactNode
98
+ - Automatically respects left/right insets from permanent drawers.
99
+
100
+ ```jsx
101
+ <Footer text="© 2025 neurons.me" />
102
+ ```
103
+
104
+ ---
105
+
106
+ ## 🌐 Why Declarative?
107
+
108
+ Every prop is JSON-serializable, so LLMs or external systems can generate full UIs declaratively:
109
+ - “Add a right drawer with a title and an insights icon”
110
+ - “Place a sticky options bar under the navbar with capture + settings”
111
+ - “On /reports, show the drawer and a compact navbar”
112
+
113
+ These map directly into JSON specs that your app hydrates into React.
114
+
115
+ ---
116
+
117
+ ## 🚀 Benefits
118
+ - **Schema-driven:** easy to serialize, validate, and diff.
119
+ - **LLM-ready:** prompt-to-UI becomes natural.
120
+ - **Layout-safe:** insets keep everything aligned automatically.
121
+ - **Composable:** any route can declare its layout in one object.
122
+
123
+ ---
124
+
125
+ ## Example: Full Route Layout
126
+
127
+ ```jsx
128
+ <NavBar title="Dashboard" />
129
+ <LeftDrawer title="Menu" />
130
+ <StickyOptionsTop items={items} />
131
+ <PageContent />
132
+ <Footer text="© 2025 neurons.me" />
133
+ ```
134
+
135
+ Or as JSON:
136
+
137
+ ```json
138
+ {
139
+ "navbar": { "title": "Dashboard" },
140
+ "drawerLeft": { "title": "Menu" },
141
+ "stickyOptions": { "items": [ ... ] },
142
+ "footer": { "text": "© 2025 neurons.me" }
143
+ }
144
+ ```
145
+
146
+ ---
147
+ That’s the philosophy: declarative contracts for every GUI building block, so your UI can be described, generated, and remixed by humans, scripts, or LLMs.
148
+ ---
149
+
@@ -0,0 +1,86 @@
1
+ import React from 'react';
2
+ import { Meta, StoryFn } from '@storybook/react';
3
+ import { useTheme, Box, Typography } from '@mui/material';
4
+
5
+ const meta: Meta = {
6
+ title: 'Theme/Palette',
7
+ };
8
+
9
+ export default meta;
10
+
11
+ const PaletteViewer: React.FC = () => {
12
+ const theme = useTheme();
13
+ const palette = theme.palette;
14
+
15
+ return (
16
+ <Box
17
+ sx={{
18
+ display: 'grid',
19
+ gridTemplateColumns: 'repeat(auto-fill, minmax(160px, 1fr))',
20
+ gap: 2,
21
+ maxHeight: '80vh',
22
+ overflowY: 'auto',
23
+ p: 2,
24
+ }}
25
+ >
26
+ {Object.entries(palette).map(([colorKey, colorValue]) => {
27
+ if (typeof colorValue === 'string') {
28
+ // Sometimes palette keys can be strings (rare)
29
+ return (
30
+ <Box key={colorKey} sx={{ border: '1px solid', borderColor: 'divider', borderRadius: 1, p: 1 }}>
31
+ <Typography variant="subtitle1" gutterBottom>
32
+ {colorKey}
33
+ </Typography>
34
+ <Box
35
+ sx={{
36
+ backgroundColor: colorValue,
37
+ height: 48,
38
+ borderRadius: 1,
39
+ mb: 1,
40
+ }}
41
+ />
42
+ <Typography variant="caption">{colorValue}</Typography>
43
+ </Box>
44
+ );
45
+ }
46
+
47
+ if (typeof colorValue === 'object' && colorValue !== null) {
48
+ return (
49
+ <Box
50
+ key={colorKey}
51
+ sx={{ border: '1px solid', borderColor: 'divider', borderRadius: 1, p: 1, display: 'flex', flexDirection: 'column' }}
52
+ >
53
+ <Typography variant="subtitle1" gutterBottom>
54
+ {colorKey}
55
+ </Typography>
56
+ {Object.entries(colorValue).map(([shadeKey, shadeValue]) => {
57
+ if (typeof shadeValue !== 'string') return null;
58
+ return (
59
+ <Box key={shadeKey} sx={{ mb: 1 }}>
60
+ <Box
61
+ sx={{
62
+ backgroundColor: shadeValue,
63
+ height: 32,
64
+ borderRadius: 1,
65
+ mb: 0.5,
66
+ border: '1px solid',
67
+ borderColor: 'divider',
68
+ }}
69
+ />
70
+ <Typography variant="caption" sx={{ userSelect: 'text' }}>
71
+ {shadeKey}: {shadeValue}
72
+ </Typography>
73
+ </Box>
74
+ );
75
+ })}
76
+ </Box>
77
+ );
78
+ }
79
+
80
+ return null;
81
+ })}
82
+ </Box>
83
+ );
84
+ };
85
+
86
+ export const Default: StoryFn = () => <PaletteViewer />;