this.gui 1.3.41 → 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 (310) hide show
  1. package/package.json +3 -2
  2. package/src/GUI.tsx +46 -0
  3. package/src/QRouter/QRegistry.tsx +53 -0
  4. package/src/QRouter/QRouter.stories.tsx +31 -0
  5. package/src/QRouter/QRouter.tsx +57 -0
  6. package/src/gui/Theme/GuiProvider.tsx +111 -0
  7. package/src/gui/Theme/Icon/Icon.resolver.tsx +29 -0
  8. package/src/gui/Theme/Icon/Icon.tsx +43 -0
  9. package/src/gui/Theme/Layout/Content/Content.resolver.tsx +0 -0
  10. package/src/gui/Theme/Layout/Content/Content.stories.tsx +88 -0
  11. package/src/gui/Theme/Layout/Content/Content.tsx +53 -0
  12. package/src/gui/Theme/Layout/Content/Content.types.tsx +40 -0
  13. package/src/gui/Theme/Layout/Footer/Footer.resolver.tsx +45 -0
  14. package/src/gui/Theme/Layout/Footer/Footer.stories.tsx +205 -0
  15. package/src/gui/Theme/Layout/Footer/Footer.tsx +337 -0
  16. package/src/gui/Theme/Layout/Footer/Footer.types.ts +40 -0
  17. package/src/gui/Theme/Layout/Layout/Layout.resolver.tsx +37 -0
  18. package/src/gui/Theme/Layout/Layout/Layout.stories.tsx +289 -0
  19. package/src/gui/Theme/Layout/Layout/Layout.tsx +117 -0
  20. package/src/gui/Theme/Layout/Layout/Layout.types.ts +57 -0
  21. package/src/gui/Theme/Layout/Layout/useLayoutBreakpoints.ts +9 -0
  22. package/src/gui/Theme/Layout/Namespace/Namespace.stories.tsx +105 -0
  23. package/src/gui/Theme/Layout/Namespace/Namespace.tsx +26 -0
  24. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.resolver.tsx +87 -0
  25. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.stories.tsx +199 -0
  26. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.tsx +311 -0
  27. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.types.ts +41 -0
  28. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/SidebarToggleButton.tsx +53 -0
  29. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.resolver.tsx +19 -0
  30. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.tsx +107 -0
  31. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.resolver.tsx +0 -0
  32. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.tsx +134 -0
  33. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.types.ts +15 -0
  34. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarMenu/LeftSidebarMenu.tsx +142 -0
  35. package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarToggleButton/LeftSidebarToggleButton.tsx +23 -0
  36. package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.resolver.tsx +35 -0
  37. package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.stories.tsx +239 -0
  38. package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.tsx +319 -0
  39. package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.types.ts +17 -0
  40. package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarAction/RightSidebarAction.tsx +102 -0
  41. package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarLink/RightSidebarLink.tsx +132 -0
  42. package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarMenu/RightSidebarMenu.tsx +140 -0
  43. package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarToggleButton/RightSidebarToggleButton.tsx +22 -0
  44. package/src/gui/Theme/Layout/StickyOptions/StickyOptionsTop.stories.tsx +469 -0
  45. package/src/gui/Theme/Layout/StickyOptions/StickyOptionsTop.tsx +489 -0
  46. package/src/gui/Theme/Layout/TopBar/TopBar.resolver.tsx +86 -0
  47. package/src/gui/Theme/Layout/TopBar/TopBar.stories.tsx +350 -0
  48. package/src/gui/Theme/Layout/TopBar/TopBar.tsx +292 -0
  49. package/src/gui/Theme/Layout/TopBar/TopBar.types.ts +39 -0
  50. package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.stories.tsx +83 -0
  51. package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.tsx +18 -0
  52. package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.types.ts +4 -0
  53. package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.stories.tsx +189 -0
  54. package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.tsx +30 -0
  55. package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.types.ts +9 -0
  56. package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.resolver.tsx +14 -0
  57. package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.stories.tsx +56 -0
  58. package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.tsx +123 -0
  59. package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.types.ts +44 -0
  60. package/src/gui/Theme/catalog/CherryByte/CherryByte.png +0 -0
  61. package/src/gui/Theme/catalog/CherryByte/dark.tokens.ts +47 -0
  62. package/src/gui/Theme/catalog/CherryByte/light.tokens.ts +47 -0
  63. package/src/gui/Theme/catalog/CherryByte/manifest.ts +24 -0
  64. package/src/gui/Theme/catalog/GhostShell/dark.tokens.ts +43 -0
  65. package/src/gui/Theme/catalog/GhostShell/ghost.png +0 -0
  66. package/src/gui/Theme/catalog/GhostShell/light.tokens.ts +39 -0
  67. package/src/gui/Theme/catalog/GhostShell/manifest.ts +24 -0
  68. package/src/gui/Theme/catalog/LunaHex/LunaHex.png +0 -0
  69. package/src/gui/Theme/catalog/LunaHex/dark.tokens.ts +34 -0
  70. package/src/gui/Theme/catalog/LunaHex/light.tokens.ts +74 -0
  71. package/src/gui/Theme/catalog/LunaHex/manifest.ts +24 -0
  72. package/src/gui/Theme/catalog/MUI/MUI.png +0 -0
  73. package/src/gui/Theme/catalog/MUI/dark.tokens.ts +58 -0
  74. package/src/gui/Theme/catalog/MUI/light.tokens.ts +74 -0
  75. package/src/gui/Theme/catalog/MUI/manifest.ts +24 -0
  76. package/src/gui/Theme/catalog/PrinceOfDarkness/dark.tokens.ts +48 -0
  77. package/src/gui/Theme/catalog/PrinceOfDarkness/light.tokens.ts +47 -0
  78. package/src/gui/Theme/catalog/PrinceOfDarkness/manifest.ts +24 -0
  79. package/src/gui/Theme/catalog/PrinceOfDarkness/prince.png +0 -0
  80. package/src/gui/Theme/catalog/PrinceOfDarkness/princeOfDarkness.png +0 -0
  81. package/src/gui/Theme/catalog/Seafoam/dark.tokens.ts +49 -0
  82. package/src/gui/Theme/catalog/Seafoam/light.tokens.ts +47 -0
  83. package/src/gui/Theme/catalog/Seafoam/manifest.ts +24 -0
  84. package/src/gui/Theme/catalog/Seafoam/seaFoam.png +0 -0
  85. package/src/gui/Theme/catalog/neurons/dark.tokens.ts +58 -0
  86. package/src/gui/Theme/catalog/neurons/light.tokens.ts +74 -0
  87. package/src/gui/Theme/catalog/neurons/manifest.ts +24 -0
  88. package/src/gui/Theme/catalog/neurons/neurons.me.png +0 -0
  89. package/src/gui/Theme/fromTokens.ts +272 -0
  90. package/src/gui/Theme/gui.css +31 -0
  91. package/src/gui/Theme/index.ts +17 -0
  92. package/src/gui/Theme/styles/buildShadows.ts +83 -0
  93. package/src/gui/Theme/styles/theme.tokens.ts +108 -0
  94. package/src/gui/Theme/utils/catalog.ts +61 -0
  95. package/src/gui/Theme/utils/persistence.ts +66 -0
  96. package/src/gui/Theme/utils/themeUtils.ts +34 -0
  97. package/src/gui/components/atoms/AppBar/AppBar.resolver.tsx +46 -0
  98. package/src/gui/components/atoms/AppBar/AppBar.stories.tsx +251 -0
  99. package/src/gui/components/atoms/AppBar/AppBar.tsx +107 -0
  100. package/src/gui/components/atoms/AppBar/AppBar.types.ts +28 -0
  101. package/src/gui/components/atoms/Avatar/Avatar.resolver.tsx +61 -0
  102. package/src/gui/components/atoms/Avatar/Avatar.stories.tsx +36 -0
  103. package/src/gui/components/atoms/Avatar/Avatar.tsx +14 -0
  104. package/src/gui/components/atoms/Box/Box.resolver.tsx +171 -0
  105. package/src/gui/components/atoms/Box/Box.stories.tsx +263 -0
  106. package/src/gui/components/atoms/Box/Box.tsx +15 -0
  107. package/src/gui/components/atoms/Button/Button.resolver.tsx +103 -0
  108. package/src/gui/components/atoms/Button/Button.stories.tsx +219 -0
  109. package/src/gui/components/atoms/Button/Button.tsx +40 -0
  110. package/src/gui/components/atoms/Card/Card.resolver.tsx +63 -0
  111. package/src/gui/components/atoms/Card/Card.stories.tsx +54 -0
  112. package/src/gui/components/atoms/Card/Card.tsx +13 -0
  113. package/src/gui/components/atoms/CardActions/CardActions.resolver.tsx +59 -0
  114. package/src/gui/components/atoms/CardActions/CardActions.stories.tsx +32 -0
  115. package/src/gui/components/atoms/CardActions/CardActions.tsx +14 -0
  116. package/src/gui/components/atoms/CardContent/CardContent.resolver.tsx +60 -0
  117. package/src/gui/components/atoms/CardContent/CardContent.stories.tsx +34 -0
  118. package/src/gui/components/atoms/CardContent/CardContent.tsx +13 -0
  119. package/src/gui/components/atoms/CardHeader/CardHeader.resolver.tsx +68 -0
  120. package/src/gui/components/atoms/CardHeader/CardHeader.stories.tsx +40 -0
  121. package/src/gui/components/atoms/CardHeader/CardHeader.tsx +12 -0
  122. package/src/gui/components/atoms/Collapse/Collapse.resolver.tsx +85 -0
  123. package/src/gui/components/atoms/Collapse/Collapse.stories.tsx +130 -0
  124. package/src/gui/components/atoms/Collapse/Collapse.tsx +17 -0
  125. package/src/gui/components/atoms/Divider/Divider.resolver.tsx +95 -0
  126. package/src/gui/components/atoms/Divider/Divider.stories.tsx +108 -0
  127. package/src/gui/components/atoms/Divider/Divider.tsx +14 -0
  128. package/src/gui/components/atoms/Drawer/Drawer.resolver.tsx +116 -0
  129. package/src/gui/components/atoms/Drawer/Drawer.stories.tsx +223 -0
  130. package/src/gui/components/atoms/Drawer/Drawer.tsx +25 -0
  131. package/src/gui/components/atoms/Grid/Grid.resolver.tsx +33 -0
  132. package/src/gui/components/atoms/Grid/Grid.stories.tsx +136 -0
  133. package/src/gui/components/atoms/Grid/Grid.tsx +15 -0
  134. package/src/gui/components/atoms/Grid/Grid.types.ts +9 -0
  135. package/src/gui/components/atoms/IconButton/IconButton.resolver.tsx +137 -0
  136. package/src/gui/components/atoms/IconButton/IconButton.stories.tsx +134 -0
  137. package/src/gui/components/atoms/IconButton/IconButton.tsx +22 -0
  138. package/src/gui/components/atoms/Link/Link.resolver.tsx +74 -0
  139. package/src/gui/components/atoms/Link/Link.stories.tsx +157 -0
  140. package/src/gui/components/atoms/Link/Link.tsx +36 -0
  141. package/src/gui/components/atoms/List/List.resolver.tsx +94 -0
  142. package/src/gui/components/atoms/List/List.stories.tsx +137 -0
  143. package/src/gui/components/atoms/List/List.tsx +20 -0
  144. package/src/gui/components/atoms/ListItem/ListItem.resolver.tsx +88 -0
  145. package/src/gui/components/atoms/ListItem/ListItem.stories.tsx +151 -0
  146. package/src/gui/components/atoms/ListItem/ListItem.tsx +19 -0
  147. package/src/gui/components/atoms/ListItemButton/ListItemButton.resolver.tsx +214 -0
  148. package/src/gui/components/atoms/ListItemButton/ListItemButton.stories.tsx +155 -0
  149. package/src/gui/components/atoms/ListItemButton/ListItemButton.tsx +15 -0
  150. package/src/gui/components/atoms/ListItemIcon/ListItemIcon.resolver.tsx +102 -0
  151. package/src/gui/components/atoms/ListItemIcon/ListItemIcon.stories.tsx +132 -0
  152. package/src/gui/components/atoms/ListItemIcon/ListItemIcon.tsx +11 -0
  153. package/src/gui/components/atoms/ListItemText/ListItemText.resolver.tsx +112 -0
  154. package/src/gui/components/atoms/ListItemText/ListItemText.stories.tsx +156 -0
  155. package/src/gui/components/atoms/ListItemText/ListItemText.tsx +15 -0
  156. package/src/gui/components/atoms/Menu/Menu.resolver.tsx +112 -0
  157. package/src/gui/components/atoms/Menu/Menu.stories.tsx +162 -0
  158. package/src/gui/components/atoms/Menu/Menu.tsx +17 -0
  159. package/src/gui/components/atoms/MenuItem/MenuItem.resolver.tsx +183 -0
  160. package/src/gui/components/atoms/MenuItem/MenuItem.stories.tsx +134 -0
  161. package/src/gui/components/atoms/MenuItem/MenuItem.tsx +14 -0
  162. package/src/gui/components/atoms/Paper/Paper.resolver.tsx +98 -0
  163. package/src/gui/components/atoms/Paper/Paper.stories.tsx +184 -0
  164. package/src/gui/components/atoms/Paper/Paper.tsx +15 -0
  165. package/src/gui/components/atoms/Section/Section.resolver.tsx +10 -0
  166. package/src/gui/components/atoms/Section/Section.stories.tsx +189 -0
  167. package/src/gui/components/atoms/Section/Section.tsx +76 -0
  168. package/src/gui/components/atoms/Section/Section.types.tsx +24 -0
  169. package/src/gui/components/atoms/Stack/Stack.resolver.tsx +94 -0
  170. package/src/gui/components/atoms/Stack/Stack.stories.tsx +160 -0
  171. package/src/gui/components/atoms/Stack/Stack.tsx +15 -0
  172. package/src/gui/components/atoms/Surface/Surface.resolver.tsx +37 -0
  173. package/src/gui/components/atoms/Surface/Surface.tsx +49 -0
  174. package/src/gui/components/atoms/Surface/Surface.types.ts +20 -0
  175. package/src/gui/components/atoms/Switch/Switch.resolver.tsx +53 -0
  176. package/src/gui/components/atoms/Switch/Switch.stories.tsx +236 -0
  177. package/src/gui/components/atoms/Switch/Switch.tsx +22 -0
  178. package/src/gui/components/atoms/Table/Body/TableBody.tsx +7 -0
  179. package/src/gui/components/atoms/Table/Cell/TableCell.tsx +18 -0
  180. package/src/gui/components/atoms/Table/Head/TableHead.tsx +9 -0
  181. package/src/gui/components/atoms/Table/Row/TableRow.tsx +20 -0
  182. package/src/gui/components/atoms/Table/Table.resolver.tsx +77 -0
  183. package/src/gui/components/atoms/Table/Table.stories.tsx +173 -0
  184. package/src/gui/components/atoms/Table/Table.tsx +20 -0
  185. package/src/gui/components/atoms/TextField/TextField.stories.tsx +25 -0
  186. package/src/gui/components/atoms/TextField/TextField.tsx +15 -0
  187. package/src/gui/components/atoms/Toolbar/Toolbar.resolver.tsx +60 -0
  188. package/src/gui/components/atoms/Toolbar/Toolbar.stories.tsx +155 -0
  189. package/src/gui/components/atoms/Toolbar/Toolbar.tsx +16 -0
  190. package/src/gui/components/atoms/Tooltip/Tooltip.resolver.tsx +142 -0
  191. package/src/gui/components/atoms/Tooltip/Tooltip.stories.tsx +117 -0
  192. package/src/gui/components/atoms/Tooltip/Tooltip.tsx +70 -0
  193. package/src/gui/components/atoms/Typography/Typography.resolver.tsx +158 -0
  194. package/src/gui/components/atoms/Typography/Typography.stories.tsx +222 -0
  195. package/src/gui/components/atoms/Typography/Typography.tsx +27 -0
  196. package/src/gui/components/atoms/Window/Nodes/node.ts +0 -0
  197. package/src/gui/components/atoms/Window/code/block/node.tsx +0 -0
  198. package/src/gui/components/atoms/Window/code/hugging.face.api.ts +11 -0
  199. package/src/gui/components/atoms/Window/connectors/index.ts +19 -0
  200. package/src/gui/components/atoms/Window/window.stories.tsx +20 -0
  201. package/src/gui/components/atoms/Window/window.tsx +636 -0
  202. package/src/gui/components/atoms/atoms.tsx +151 -0
  203. package/src/gui/components/atoms/index.ts +2 -0
  204. package/src/gui/components/generics/Cards/Gridme.jsx +52 -0
  205. package/src/gui/components/generics/Cards/LilBox.jsx +65 -0
  206. package/src/gui/components/generics/Cards/ModuleCard.jsx +106 -0
  207. package/src/gui/components/generics/Chats/FullChatBot.jsx +223 -0
  208. package/src/gui/components/generics/Code/CodeBlock.jsx +33 -0
  209. package/src/gui/components/generics/EmojiCursor/EmojiCursor.stories.tsx +153 -0
  210. package/src/gui/components/generics/EmojiCursor/EmojiCursor.tsx +23 -0
  211. package/src/gui/components/generics/Feedback/Callout.jsx +92 -0
  212. package/src/gui/components/generics/Layout/GridX.jsx +29 -0
  213. package/src/gui/components/generics/Layout/Hero2.jsx +132 -0
  214. package/src/gui/components/generics/Layout/PageContainer.jsx +29 -0
  215. package/src/gui/components/generics/Layout/PageDivider.jsx +20 -0
  216. package/src/gui/components/generics/Layout/Section.jsx +43 -0
  217. package/src/gui/components/generics/Layout/SectionHeader.jsx +21 -0
  218. package/src/gui/components/generics/Media/Img.jsx +58 -0
  219. package/src/gui/components/generics/Media/VideoEmbed.jsx +51 -0
  220. package/src/gui/components/generics/Organization/TableOfContents.jsx +51 -0
  221. package/src/gui/components/generics/Organization/Tabs.jsx +45 -0
  222. package/src/gui/components/generics/Text/TextList.jsx +41 -0
  223. package/src/gui/components/generics/Text/TextParagraph.jsx +28 -0
  224. package/src/gui/components/generics/Text/TextQuote.jsx +23 -0
  225. package/src/gui/components/generics/Text/TextTitle.jsx +44 -0
  226. package/src/gui/components/molecules/Dialog/Dialog.stories.tsx +18 -0
  227. package/src/gui/components/molecules/Dialog/Dialog.tsx +5 -0
  228. package/src/gui/components/molecules/Hero/Hero.stories.tsx +140 -0
  229. package/src/gui/components/molecules/Hero/Hero.tsx +152 -0
  230. package/src/gui/components/molecules/Hero/Hero.types.tsx +18 -0
  231. package/src/gui/components/molecules/Modal/Modal.resolver.tsx +38 -0
  232. package/src/gui/components/molecules/Modal/Modal.stories.tsx +82 -0
  233. package/src/gui/components/molecules/Modal/Modal.tsx +110 -0
  234. package/src/gui/components/molecules/Modal/Modal.types.ts +29 -0
  235. package/src/gui/components/molecules/Page/Page.stories.tsx +135 -0
  236. package/src/gui/components/molecules/Page/Page.tsx +94 -0
  237. package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.resolver.tsx +58 -0
  238. package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.stories.tsx +133 -0
  239. package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.tsx +101 -0
  240. package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.types.ts +29 -0
  241. package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.resolver.tsx +15 -0
  242. package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.stories.tsx +88 -0
  243. package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.tsx +167 -0
  244. package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.types.ts +34 -0
  245. package/src/gui/components/molecules/molecules.ts +49 -0
  246. package/src/gui/components/organisms/Blockchain/Blocks/BlocksTable.tsx +119 -0
  247. package/src/gui/components/organisms/Blockchain/Usernames/Identities.stories.tsx +20 -0
  248. package/src/gui/components/organisms/Blockchain/Usernames/QR.tsx +566 -0
  249. package/src/gui/components/organisms/Blockchain/Usernames/Usernames.tsx +448 -0
  250. package/src/gui/components/organisms/Blockchain/Usernames/identities.tsx +710 -0
  251. package/src/gui/components/organisms/Blockchain/blockchain.stories.tsx +17 -0
  252. package/src/gui/components/organisms/Blockchain/blockchain.tsx +368 -0
  253. package/src/gui/components/organisms/Blockchain/scripts/connection.ts +82 -0
  254. package/src/gui/components/organisms/Blockchain/scripts/match_face.ts +143 -0
  255. package/src/gui/components/organisms/HighLighter/HighLighter.stories.tsx +168 -0
  256. package/src/gui/components/organisms/HighLighter/HighLighter.tsx +420 -0
  257. package/src/gui/components/organisms/HighLighter/HighLightsDrawer.tsx +197 -0
  258. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/FaceRecognition.stories.tsx +312 -0
  259. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/FaceRecognition.tsx +765 -0
  260. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceCameraPermission.ts +70 -0
  261. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceLandmarker.ts +106 -0
  262. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceOverlay.ts +489 -0
  263. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceTemplate.ts +32 -0
  264. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceTemplateBurst.ts +178 -0
  265. package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/verifyTemplate.ts +136 -0
  266. package/src/gui/components/organisms/IdentityNoise/IdentityNoise.tsx +403 -0
  267. package/src/gui/components/organisms/IdentityNoise/IndentityNoise.stories.tsx +15 -0
  268. package/src/gui/components/organisms/IdentityNoise/Noise/Noise.stories.tsx +206 -0
  269. package/src/gui/components/organisms/IdentityNoise/Noise/Noise.tsx +394 -0
  270. package/src/gui/components/organisms/IdentityNoise/Triad/QR.tsx +566 -0
  271. package/src/gui/components/organisms/IdentityNoise/Triad/Tiad.stories.tsx +6 -0
  272. package/src/gui/components/organisms/IdentityNoise/Triad/Triad.tsx +917 -0
  273. package/src/gui/components/organisms/IdentityNoise/Triad/handleCleak.ts +0 -0
  274. package/src/gui/components/organisms/IdentityNoise/Triad/identity.ts +31 -0
  275. package/src/gui/components/organisms/IdentityNoise/Triad/me/fundamentals/vectors/vectors.tsx +252 -0
  276. package/src/gui/components/organisms/IdentityNoise/Triad/me/me.stories.tsx +314 -0
  277. package/src/gui/components/organisms/IdentityNoise/Triad/me/me.tsx +0 -0
  278. package/src/gui/components/organisms/organisms.ts +15 -0
  279. package/src/gui/contexts/InsetsContext.tsx +40 -0
  280. package/src/gui/contexts/LeftSidebarContext.tsx +20 -0
  281. package/src/gui/contexts/RightSidebarContext.tsx +25 -0
  282. package/src/gui/contexts/ThemeContext.ts +34 -0
  283. package/src/gui/contexts/index.ts +4 -0
  284. package/src/gui/hooks/index.ts +11 -0
  285. package/src/gui/hooks/resolveColorToken.ts +39 -0
  286. package/src/gui/hooks/useCodeGen.ts +12 -0
  287. package/src/gui/hooks/useGuiMediaQuery.ts +18 -0
  288. package/src/gui/hooks/useGuiTheme.ts +18 -0
  289. package/src/gui/hooks/useInsets.ts +26 -0
  290. package/src/gui/hooks/useIsMobile.ts +13 -0
  291. package/src/gui/hooks/useIsTouchDevice.ts +25 -0
  292. package/src/gui/hooks/useLeftSidebar.ts +10 -0
  293. package/src/gui/hooks/useRightSidebar.ts +12 -0
  294. package/src/gui/hooks/useViewportKey.ts +19 -0
  295. package/src/gui/hooks/useViewportProp.ts +17 -0
  296. package/src/gui/registry/GuiRegistry.ts +19 -0
  297. package/src/gui/registry/factory.ts +12 -0
  298. package/src/gui/registry/index.ts +3 -0
  299. package/src/gui/registry/types.ts +6 -0
  300. package/src/gui/utils/nodeID.ts +11 -0
  301. package/src/registry/GuiRegistry.ts +19 -0
  302. package/src/stories/01.Home.mdx +22 -0
  303. package/src/stories/02.Understanding.This.GUI.mdx +149 -0
  304. package/src/stories/Theme/Palette.stories.tsx +86 -0
  305. package/src/stories/Theme/ThemeViewer.stories.tsx +91 -0
  306. package/src/stories/Theme/Typography.stories.jsx +211 -0
  307. package/src/stories/assets/this.GUI.png +0 -0
  308. package/src/types/gui.d.ts +67 -0
  309. package/src/types/theme.d.ts +191 -0
  310. package/src/types/viewport.ts +132 -0
@@ -0,0 +1,117 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Tooltip, Button, Typography } from '@/gui/components/atoms';
3
+
4
+ const meta: Meta<typeof Tooltip> = {
5
+ title: 'Atoms/Content/Tooltip',
6
+ component: Tooltip,
7
+ tags: ['autodocs'],
8
+ parameters: {
9
+ docs: {
10
+ description: {
11
+ component:
12
+ "This Tooltip is a thin wrapper around MUI's Tooltip, supporting all MUI props and the `sx` prop for styling. Use it for helpful hover information, and configure it via JSON/config declaratively.",
13
+ },
14
+ },
15
+ },
16
+ };
17
+
18
+ export default meta;
19
+ type Story = StoryObj<typeof Tooltip>;
20
+
21
+ export const Playground: Story = {
22
+ args: {
23
+ title: 'Tooltip text',
24
+ placement: 'top',
25
+ arrow: false,
26
+ size: 'md',
27
+ children: <Button variant="contained">Hover me</Button>,
28
+ },
29
+ argTypes: {
30
+ title: { control: 'text' },
31
+ placement: {
32
+ control: 'select',
33
+ options: ['top', 'bottom', 'left', 'right'],
34
+ },
35
+ arrow: { control: 'boolean' },
36
+ size: {
37
+ control: 'select',
38
+ options: ['sm', 'md', 'lg'],
39
+ },
40
+ },
41
+ render: (args) => <Tooltip {...args} size={args.size}>{args.children}</Tooltip>,
42
+ };
43
+
44
+ export const PlacementRight: Story = {
45
+ name: 'Placement: right',
46
+ render: () => (
47
+ <Tooltip title="Right placed tooltip" placement="right">
48
+ <Button variant="contained">Hover right</Button>
49
+ </Tooltip>
50
+ ),
51
+ parameters: {
52
+ docs: {
53
+ description: {
54
+ story: 'Tooltip with `placement="right"` demonstrates MUI placement support.',
55
+ },
56
+ },
57
+ },
58
+ };
59
+
60
+ export const WithArrow: Story = {
61
+ name: 'Arrow',
62
+ render: () => (
63
+ <Tooltip title="Tooltip with arrow" arrow>
64
+ <Button variant="contained">Hover arrow</Button>
65
+ </Tooltip>
66
+ ),
67
+ parameters: {
68
+ docs: {
69
+ description: {
70
+ story: 'Tooltip with `arrow={true}` prop shows the arrow, just like MUI.',
71
+ },
72
+ },
73
+ },
74
+ };
75
+
76
+ export const WithTypography: Story = {
77
+ name: 'Wrapped Typography',
78
+ render: () => (
79
+ <Tooltip title="Tooltip on text">
80
+ <Typography variant="body1" sx={{ cursor: 'pointer', display: 'inline-block' }}>
81
+ Hover this text
82
+ </Typography>
83
+ </Tooltip>
84
+ ),
85
+ parameters: {
86
+ docs: {
87
+ description: {
88
+ story: 'Tooltip wrapping a Typography element, showing flexibility and full MUI compatibility.',
89
+ },
90
+ },
91
+ },
92
+ };
93
+
94
+
95
+ export const WithSize: Story = {
96
+ name: 'With Size',
97
+ render: () => (
98
+ <div style={{ display: 'flex', gap: 24 }}>
99
+ <Tooltip title="Small size tooltip" size="sm">
100
+ <Button variant="contained">Small (sm)</Button>
101
+ </Tooltip>
102
+ <Tooltip title="Medium size tooltip" size="md">
103
+ <Button variant="contained">Medium (md)</Button>
104
+ </Tooltip>
105
+ <Tooltip title="Large size tooltip" size="lg">
106
+ <Button variant="contained">Large (lg)</Button>
107
+ </Tooltip>
108
+ </div>
109
+ ),
110
+ parameters: {
111
+ docs: {
112
+ description: {
113
+ story: 'Demonstrates the Tooltip with different `size` props: small, medium, and large.',
114
+ },
115
+ },
116
+ },
117
+ };
@@ -0,0 +1,70 @@
1
+ /**
2
+ * This.GUI — Tooltip (atom)
3
+ * Thin wrapper around MUI's Tooltip that keeps a stable import path:
4
+ * import { Tooltip } from '@/gui/atoms'
5
+ *
6
+ * Extensions:
7
+ * - Adds an optional `size` prop (`'sm' | 'md' | 'lg' | 'xl'`) to scale typography/padding/arrow.
8
+ * - Still allows granular overrides via `slotProps.tooltip.sx` and `slotProps.arrow.sx`
9
+ * which take precedence (our size styles are merged first).
10
+ *
11
+ * Notes:
12
+ * - Tooltip is NOT polymorphic (no `component` prop).
13
+ * - Works seamlessly with This.GUI theme through GuiProvider.
14
+ *
15
+ * Examples:
16
+ * &lt;Tooltip title="Hello"&gt;&lt;Button&gt;Hover me&lt;/Button&gt;&lt;/Tooltip&gt;
17
+ * &lt;Tooltip title="Info" size="lg" arrow placement="right" slotProps={{ tooltip: { sx: { bgcolor: 'primary.main' } } }}&gt;
18
+ * &lt;IconButton&gt;&lt;Icon name="mui:Info" /&gt;&lt;/IconButton&gt;
19
+ * &lt;/Tooltip&gt;
20
+ */
21
+ import * as React from 'react';
22
+ import MuiTooltip, { type TooltipProps as MuiTooltipProps } from '@mui/material/Tooltip';
23
+ export type TooltipSize = 'sm' | 'md' | 'lg' | 'xl';
24
+ export type TooltipProps = Omit<MuiTooltipProps, 'slotProps'> & {
25
+ /**
26
+ * Visual size of the tooltip bubble (typography + padding + arrow).
27
+ * This is a This.GUI extension; if omitted, MUI defaults are used.
28
+ */
29
+ size?: TooltipSize;
30
+ /**
31
+ * Keep MUI slotProps but allow merging with size presets.
32
+ * User-provided sx is applied AFTER our size preset, so it wins.
33
+ */
34
+ slotProps?: MuiTooltipProps['slotProps'];
35
+ };
36
+
37
+ const SIZE_PRESETS: Record<TooltipSize, { tooltipSx: any; arrowSx: any }> = {
38
+ sm: { tooltipSx: { fontSize: 11, p: '4px 8px' }, arrowSx: { fontSize: 10 } },
39
+ md: { tooltipSx: { fontSize: 13, p: '6px 10px' }, arrowSx: { fontSize: 12 } },
40
+ lg: { tooltipSx: { fontSize: 15, p: '8px 12px' }, arrowSx: { fontSize: 14 } },
41
+ xl: { tooltipSx: { fontSize: 17, p: '10px 14px' }, arrowSx: { fontSize: 16 } },
42
+ };
43
+
44
+ const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(function Tooltip(props, ref) {
45
+ const { size, slotProps, ...rest } = props;
46
+ // Build merged slotProps so consumer overrides win
47
+ const preset = size ? SIZE_PRESETS[size] : undefined;
48
+ const mergedSlotProps = React.useMemo<any>(() => {
49
+ if (!preset) return slotProps;
50
+ const next = { ...slotProps };
51
+ // Tooltip content
52
+ next.tooltip = {
53
+ ...(slotProps?.tooltip as any),
54
+ // Ensure `sx` is an array so both apply; user-provided last wins.
55
+ sx: [preset.tooltipSx, (slotProps?.tooltip as any)?.sx].filter(Boolean) as any,
56
+ } as any;
57
+ // Arrow (applies only if `arrow` prop is set, but harmless to keep)
58
+ next.arrow = {
59
+ ...(slotProps?.arrow as any),
60
+ sx: [preset.arrowSx, (slotProps?.arrow as any)?.sx].filter(Boolean) as any,
61
+ } as any;
62
+ return next;
63
+ }, [preset, slotProps]);
64
+
65
+ return <MuiTooltip ref={ref} slotProps={mergedSlotProps} {...rest} />;
66
+ });
67
+
68
+ (Tooltip as any).displayName = 'Gui.Tooltip';
69
+ export default Tooltip;
70
+ export type { TooltipProps as GuiTooltipProps };
@@ -0,0 +1,158 @@
1
+ // src/gui/atoms/Typography/Typography.resolver.tsx
2
+ import * as React from 'react';
3
+ import Typography from './Typography';
4
+ import Link from '@/gui/atoms/Link/Link';
5
+ import type { RegistryEntry } from '@/gui/registry/types';
6
+ import type { SxProps, Theme } from '@mui/material/styles';
7
+ import { ensureNodeId } from '@/gui/utils/nodeID';
8
+
9
+ /**
10
+ * Declarative spec for Typography
11
+ * - JSON-friendly: prefer `to` / `href` / `external` over `component`.
12
+ * - React usage: `component` may be a real React element type (Link, etc.).
13
+ * - A `data-gui-id` is attached automatically for stable editor/node identification.
14
+ */
15
+ type TypographySpec = {
16
+ type: 'Typography';
17
+ props?: {
18
+ // Content
19
+ text?: React.ReactNode; // convenience for simple text
20
+ children?: React.ReactNode; // explicit children wins over `text`
21
+
22
+ // Core MUI props (subset; rest are passthrough)
23
+ variant?:
24
+ | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
25
+ | 'subtitle1' | 'subtitle2'
26
+ | 'body1' | 'body2'
27
+ | 'caption' | 'overline'
28
+ | 'button';
29
+ align?: 'inherit' | 'left' | 'center' | 'right' | 'justify';
30
+ paragraph?: boolean;
31
+ gutterBottom?: boolean;
32
+ noWrap?: boolean;
33
+ color?: any;
34
+ variantMapping?: Record<string, React.ElementType>;
35
+
36
+ // Polymorphism / routing
37
+ component?: any; // React-only; ignored if a plain string (except 'a')
38
+ as?: any; // alias of component
39
+ to?: string; // SPA routing (resolver defaults to This.GUI Link)
40
+ href?: string; // anchor target
41
+ external?: boolean; // if true → anchor + safe target/rel
42
+ target?: React.HTMLAttributeAnchorTarget;
43
+ rel?: string;
44
+
45
+ // Styling / misc
46
+ sx?: SxProps<Theme>;
47
+ className?: string;
48
+ id?: string;
49
+ 'data-testid'?: string;
50
+
51
+ // arbitrary passthrough
52
+ [key: string]: any;
53
+ };
54
+ };
55
+
56
+ /**
57
+ * TypographyResolver
58
+ * - Maps JSON-friendly spec → real <Typography /> props.
59
+ * - If `to` is present (and no explicit component), defaults to This.GUI `Link`.
60
+ * - If `external` is true, or `href` is provided (and no explicit component), renders an anchor.
61
+ * - Never leaks `to`/`href` to invalid targets.
62
+ * - A `data-gui-id` is attached automatically for stable editor/node identification.
63
+ */
64
+ const TypographyResolver: RegistryEntry = {
65
+ type: 'Typography',
66
+ resolve(spec: TypographySpec) {
67
+ const p = spec.props ?? {};
68
+
69
+ // Stable editor/node id (does not collide with user's `id`)
70
+ const guiId = ensureNodeId('Typography', (p as any)['data-gui-id']);
71
+
72
+ // Resolve a safe component:
73
+ // - accept real React element types/functions (React usage)
74
+ // - allow intrinsic 'a' (string) explicitly
75
+ // - ignore other strings coming from JSON (e.g. "Link")
76
+ const rawComp = p.component ?? p.as;
77
+ const safeFromReact =
78
+ typeof rawComp === 'function' ? rawComp
79
+ : undefined;
80
+ const allowedIntrinsic = rawComp === 'a' ? 'a' : undefined;
81
+
82
+ let component: any = safeFromReact ?? allowedIntrinsic ?? undefined;
83
+
84
+ // Build routing props carefully, only when target supports them
85
+ const extraProps: Record<string, any> = {};
86
+
87
+ if (p.external) {
88
+ // External anchors always render as <a>
89
+ if (!component) component = 'a';
90
+ if (component === 'a') {
91
+ extraProps.href = p.href;
92
+ extraProps.target = p.target ?? '_blank';
93
+ extraProps.rel = p.rel ?? 'noopener noreferrer';
94
+ }
95
+ } else if (p.to && !component) {
96
+ // SPA routing by default uses our Link
97
+ component = Link;
98
+ extraProps.to = p.to;
99
+ } else if (p.href && !component) {
100
+ // Plain anchors (non-external)
101
+ component = 'a';
102
+ extraProps.href = p.href;
103
+ if (p.target) extraProps.target = p.target;
104
+ if (p.rel) extraProps.rel = p.rel;
105
+ } else {
106
+ // If user passed a real Link component explicitly, wire `to`
107
+ if (component === Link && p.to) {
108
+ extraProps.to = p.to;
109
+ }
110
+ // If user passed 'a', wire `href`/`target`/`rel`
111
+ if (component === 'a' && (p.href || p.target || p.rel)) {
112
+ if (p.href) extraProps.href = p.href;
113
+ if (p.target) extraProps.target = p.target;
114
+ if (p.rel) extraProps.rel = p.rel;
115
+ }
116
+ // Otherwise do not leak `to`/`href` to invalid DOM nodes
117
+ }
118
+
119
+ // Children precedence: explicit children > text > empty
120
+ const children = p.children ?? p.text ?? null;
121
+
122
+ // Strip resolver-only fields so they don't end up as DOM attributes
123
+ const {
124
+ text: _text,
125
+ as: _as,
126
+ external: _external,
127
+ to: _to,
128
+ href: _href,
129
+ target: _target,
130
+ rel: _rel,
131
+ ...rest
132
+ } = p;
133
+
134
+ return (
135
+ <Typography
136
+ component={component}
137
+ variant={p.variant}
138
+ align={p.align}
139
+ paragraph={p.paragraph}
140
+ gutterBottom={p.gutterBottom}
141
+ noWrap={p.noWrap}
142
+ color={p.color}
143
+ variantMapping={p.variantMapping}
144
+ sx={p.sx}
145
+ className={p.className}
146
+ id={p.id}
147
+ data-testid={p['data-testid']}
148
+ data-gui-id={guiId}
149
+ {...extraProps}
150
+ {...rest}
151
+ >
152
+ {children}
153
+ </Typography>
154
+ );
155
+ },
156
+ };
157
+
158
+ export default TypographyResolver;
@@ -0,0 +1,222 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Typography from './Typography';
3
+ import Link from '../Link/Link';
4
+
5
+ const meta = {
6
+ title: 'Atoms/Content/Typography',
7
+ component: Typography,
8
+ tags: ['autodocs'],
9
+ decorators: [
10
+ (Story) => (
11
+ <div style={{ padding: 24 }}>
12
+ <Story />
13
+ </div>
14
+ ),
15
+ ],
16
+ parameters: {
17
+ docs: {
18
+ description: {
19
+ component: `
20
+ **Typography** is a thin, polymorphic wrapper around MUI's Typography that keeps the full API
21
+ while exposing it through This.GUI. Import it from **@/gui/primitives** instead of @mui/material so
22
+ you can swap render engines in the future without breaking consumers.
23
+
24
+ ### Key points
25
+ - Preserves MUI's polymorphism (\`component\`, \`as\`, \`variantMapping\`).
26
+ - Works with routers and anchors: \`component={Link}\` + \`to\`, or \`component="a"\` + \`href\`.
27
+ - Styled by your This.GUI theme (typography, palette, spacing).
28
+
29
+ ### Common variants
30
+ MUI variants like \`h1..h6\`, \`subtitle1/2\`, \`body1/2\`, \`caption\`, \`overline\` are supported.
31
+
32
+ ### Declarative JSON example
33
+ You can describe text nodes in JSON and hydrate them in a renderer:
34
+
35
+ ~~~json
36
+ {
37
+ "type": "Typography",
38
+ "props": {
39
+ "variant": "h4",
40
+ "component": "h2",
41
+ "gutterBottom": true
42
+ },
43
+ "children": "Section Title"
44
+ }
45
+ ~~~
46
+
47
+ A naive hydration would look like:
48
+
49
+ ~~~tsx
50
+ const spec = {
51
+ type: 'Typography',
52
+ props: { variant: 'h4', component: 'h2', gutterBottom: true },
53
+ children: 'Section Title'
54
+ };
55
+
56
+ <Typography {...spec.props}>{spec.children}</Typography>
57
+ ~~~
58
+ `,
59
+ },
60
+ },
61
+ controls: { exclude: ['component', 'to', 'href', 'variantMapping', 'ref'] },
62
+ },
63
+ } satisfies Meta<typeof Typography>;
64
+
65
+ export default meta;
66
+
67
+ type Story = StoryObj<typeof Typography>;
68
+
69
+ export const Basic: Story = {
70
+ args: {
71
+ variant: 'body1',
72
+ children: 'Hello from Typography',
73
+ },
74
+ };
75
+
76
+ export const Variants: Story = {
77
+ render: () => (
78
+ <div style={{ display: 'grid', gap: 8 }}>
79
+ <Typography variant="h1">h1. Heading</Typography>
80
+ <Typography variant="h2">h2. Heading</Typography>
81
+ <Typography variant="h3">h3. Heading</Typography>
82
+ <Typography variant="h4">h4. Heading</Typography>
83
+ <Typography variant="h5">h5. Heading</Typography>
84
+ <Typography variant="h6">h6. Heading</Typography>
85
+ <Typography variant="subtitle1">subtitle1</Typography>
86
+ <Typography variant="subtitle2">subtitle2</Typography>
87
+ <Typography variant="body1">body1</Typography>
88
+ <Typography variant="body2">body2</Typography>
89
+ <Typography variant="caption">caption</Typography>
90
+ <Typography variant="overline">overline</Typography>
91
+ </div>
92
+ ),
93
+ parameters: {
94
+ docs: {
95
+ description: {
96
+ story: 'Preview of common Material UI typography variants.'
97
+ }
98
+ }
99
+ }
100
+ };
101
+
102
+ export const AsPropAndGutter: Story = {
103
+ name: 'Semantic element (component) + gutter',
104
+ render: () => (
105
+ <div>
106
+ <Typography variant="h4" component="h2" gutterBottom>
107
+ Section title (rendered as h2)
108
+ </Typography>
109
+ <Typography variant="body1">
110
+ Body text below the title. The \`gutterBottom\` on the title adds spacing.
111
+ </Typography>
112
+ </div>
113
+ ),
114
+ };
115
+
116
+ export const Alignment: Story = {
117
+ render: () => (
118
+ <div style={{ display: 'grid', gap: 8 }}>
119
+ <Typography align="left">Left aligned</Typography>
120
+ <Typography align="center">Center aligned</Typography>
121
+ <Typography align="right">Right aligned</Typography>
122
+ </div>
123
+ ),
124
+ };
125
+
126
+ export const Colors: Story = {
127
+ render: () => (
128
+ <div style={{ display: 'grid', gap: 8 }}>
129
+ <Typography color="text.primary">text.primary</Typography>
130
+ <Typography color="text.secondary">text.secondary</Typography>
131
+ <Typography color="primary">primary</Typography>
132
+ <Typography color="#00aa96">#00aa96 (custom)</Typography>
133
+ </div>
134
+ ),
135
+ };
136
+
137
+ export const WithRouterAndAnchor: Story = {
138
+ name: 'Routing & anchors',
139
+ render: () => (
140
+ <div style={{ display: 'grid', gap: 12 }}>
141
+ {/* Router link (uses This.GUI Link under the hood) */}
142
+ <Typography component={Link as any} to="/docs" underline="none">
143
+ Go to /docs (Router link)
144
+ </Typography>
145
+
146
+ {/* External anchor */}
147
+ <Typography component="a" href="https://neurons.me" target="_blank" rel="noopener noreferrer">
148
+ Visit neurons.me (anchor)
149
+ </Typography>
150
+ </div>
151
+ ),
152
+ parameters: {
153
+ docs: {
154
+ description: {
155
+ story: 'Demonstrates polymorphism: render as router link (with `to`) and as anchor (with `href`).'
156
+ }
157
+ }
158
+ }
159
+ };
160
+
161
+ export const VariantMappingOverride: Story = {
162
+ name: 'variantMapping override',
163
+ render: () => (
164
+ <div style={{ display: 'grid', gap: 8 }}>
165
+ <Typography
166
+ variant="subtitle1"
167
+ variantMapping={{ subtitle1: 'h3', body1: 'p' }}
168
+ >
169
+ subtitle1 text rendered as an H3 element via variantMapping
170
+ </Typography>
171
+ <Typography
172
+ variant="body1"
173
+ variantMapping={{ subtitle1: 'h3', body1: 'p' }}
174
+ >
175
+ body1 text rendered as a P element via variantMapping
176
+ </Typography>
177
+ </div>
178
+ ),
179
+ parameters: {
180
+ docs: {
181
+ description: {
182
+ story: 'MUI Typography allows remapping variants to different HTML elements without changing visual style.'
183
+ }
184
+ }
185
+ }
186
+ };
187
+
188
+ export const DeclarativeSpec: Story = {
189
+ name: 'Declarative (JSON → Typography)',
190
+ render: () => {
191
+ const spec = {
192
+ type: 'Typography',
193
+ props: { variant: 'h5', component: 'h3', gutterBottom: true },
194
+ children: 'Declaratively rendered title',
195
+ } as const;
196
+
197
+ return (
198
+ <div style={{ display: 'grid', gap: 12 }}>
199
+ <pre style={{ background: 'rgba(127,127,127,0.08)', padding: 12, borderRadius: 8 }}>
200
+ {`{
201
+ "type": "Typography",
202
+ "props": {
203
+ "variant": "h5",
204
+ "component": "h3",
205
+ "gutterBottom": true
206
+ },
207
+ "children": "Declaratively rendered title"
208
+ }`}
209
+ </pre>
210
+ {/* naive renderer */}
211
+ <Typography {...spec.props}>{spec.children}</Typography>
212
+ </div>
213
+ );
214
+ },
215
+ parameters: {
216
+ docs: {
217
+ description: {
218
+ story: 'Example of hydrating a Typography node from a JSON spec. In production, your app would use a central registry/renderer.'
219
+ }
220
+ }
221
+ }
222
+ };
@@ -0,0 +1,27 @@
1
+ /*
2
+ * This.GUI — Typography (polymorphic)
3
+ * Thin wrapper over MUI's Typography that preserves its full polymorphic API:
4
+ * - `component` / `as` (MUI OverridableComponent)
5
+ * - `variantMapping`
6
+ * - works with router links (`component={Link}`) or anchors (`component="a"`)
7
+ *
8
+ * Import from "@/gui/atoms" instead of "@mui/material" so we can change
9
+ * the underlying engine without breaking consumers.
10
+ */
11
+ import * as React from 'react';
12
+ import MuiTypography from '@mui/material/Typography';
13
+ import type { OverridableComponent } from '@mui/material/OverridableComponent';
14
+ import type { TypographyTypeMap } from '@mui/material/Typography';
15
+ // Public prop type (mirrors MUI's polymorphic typing)
16
+ export type TypographyProps = React.ComponentProps<
17
+ OverridableComponent<TypographyTypeMap<{}, 'span'>>
18
+ >;
19
+ // Component: preserve MUI OverridableComponent so `component` works as in MUI
20
+ const Typography = MuiTypography as unknown as OverridableComponent<
21
+ TypographyTypeMap<{}, 'span'>
22
+ >;
23
+ // DevTools label
24
+ (Typography as any).displayName = 'Gui.Typography';
25
+ // Helpful alias for consumers who prefer a prefixed name
26
+ export type GuiTypographyProps = TypographyProps;
27
+ export default Typography;
File without changes
@@ -0,0 +1,11 @@
1
+ export async function runHuggingFace(model: string, input: string, token: string) {
2
+ const res = await fetch(`https://api-inference.huggingface.co/models/${model}`, {
3
+ method: "POST",
4
+ headers: {
5
+ "Authorization": `Bearer ${token}`,
6
+ "Content-Type": "application/json"
7
+ },
8
+ body: JSON.stringify({ inputs: input }),
9
+ });
10
+ return await res.json();
11
+ }
@@ -0,0 +1,19 @@
1
+ export const connectors = {
2
+ openai: async (prompt: string) => {
3
+ const res = await fetch("/api/openai", {
4
+ method: "POST",
5
+ body: JSON.stringify({ prompt }),
6
+ headers: { "Content-Type": "application/json" },
7
+ });
8
+ const data = await res.json();
9
+ return data.result;
10
+ },
11
+ huggingface: async (input: string) => {
12
+ const res = await fetch("/api/huggingface", {
13
+ method: "POST",
14
+ body: JSON.stringify({ inputs: input }),
15
+ headers: { "Content-Type": "application/json" },
16
+ });
17
+ return await res.json();
18
+ },
19
+ };
@@ -0,0 +1,20 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import UncontainedUI from './window';
3
+ const meta: Meta<typeof UncontainedUI> = {
4
+ title: 'Atoms/Window',
5
+ component: UncontainedUI,
6
+ parameters: {
7
+ layout: 'fullscreen',
8
+ },
9
+ };
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof UncontainedUI>;
13
+ export const Default: Story = {
14
+ args: {},
15
+ render: () => (
16
+ <div style={{ width: '100vw', height: '100vh' }}>
17
+ <UncontainedUI />
18
+ </div>
19
+ ),
20
+ };