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,469 @@
1
+ import React from 'react';
2
+ import Box from '@/gui/atoms/Box/Box';
3
+ import Paper from '@/gui/atoms/Paper/Paper';
4
+ import Typography from '@/gui/atoms/Typography/Typography';
5
+ import StickyOptionsTop from './StickyOptionsTop';
6
+ import Icon from '@/gui/Theme/Icon/Icon';
7
+ import NavBar from '../TopBar/TopBar';
8
+ import type { Meta, StoryObj } from '@storybook/react';
9
+
10
+ const meta: Meta<typeof StickyOptionsTop> = {
11
+ title: 'Layout/StickyOptions/StickyOptionsTop',
12
+ component: StickyOptionsTop,
13
+ tags: ['autodocs'],
14
+ parameters: {
15
+ layout: 'fullscreen',
16
+ docs: {
17
+ description: {
18
+ component: `
19
+ ### StickyOptionsTop — Quick actions bar
20
+
21
+ **StickyOptionsTop** renders a compact, theme‑aware quick‑actions bar that sits just **under the NavBar** and automatically respects permanent drawer insets (left/right) as well as the runtime **nav height** provided by your \`CustomThemeProvider\`.
22
+
23
+ It supports both **declarative icons** (e.g. \`"mui:Settings"\`, \`"lucide:camera"\`) via the project icon registry and **direct React nodes**, collapses nicely on small screens, and can optionally hide while scrolling.
24
+
25
+ ---
26
+
27
+ #### ✨ What it does
28
+
29
+ - **Positions itself** relative to your layout:
30
+ - Uses \`theme.layout.insets.nav\` (kept in sync by your \`NavBar\`) to sit below the app bar.
31
+ - Uses \`theme.layout.insets.left/right\` (kept in sync by permanent drawers) to center within the remaining space.
32
+ - **Layout modes**:
33
+ - \`"sticky"\` (default): scrolls with content and sticks below the NavBar.
34
+ - \`"fixed"\`: pinned to the viewport; also honors insets and the nav height.
35
+ - **Mobile behavior**:
36
+ - Can render a slim “pill” with labels or an icon‑only compact layout.
37
+ - **Theme aware**:
38
+ - Uses MUI palette and custom tokens; icons can inherit color or use palette keys (e.g. \`primary\`, \`info\`) or raw CSS colors.
39
+
40
+ > **Default spacing:** the bar keeps a small gap below the NavBar via \`topOffset: "0.25rem"\`.
41
+ > Override with \`positioning.topOffset\`.
42
+
43
+ ---
44
+
45
+ ## Props
46
+
47
+ All props are optional unless noted.
48
+
49
+ ### \`items: Array<Item>\`
50
+ Each item can be either **declarative** (icon string) or a **ReactNode**.
51
+
52
+ \`\`\`ts
53
+ type Item = {
54
+ icon: React.ReactNode | string; // e.g. "mui:Settings" | "lucide:bolt" | <Icon .../>
55
+ label?: string; // button text (omit to render icon-only)
56
+ href?: string; // if present, renders an anchor
57
+ iconColor?: string; // palette key ("primary", "info") or CSS color ("#ff9800")
58
+ variant?: 'primary' | 'neutral' // styling accent (default: 'neutral')
59
+ trackId?: string; // optional analytics id
60
+ ariaLabel?: string; // accessibility label when label is omitted
61
+ }
62
+ \`\`\`
63
+
64
+ ### \`mobileVariant: 'auto' | 'fab' | 'inline'\`
65
+ - **auto** (default): chooses best layout for the viewport width.
66
+ - **fab**: renders up to 3 circular icon buttons (compact, mobile‑style).
67
+ - **inline**: keeps the pill‑style bar inline on mobile.
68
+
69
+ ### \`dense: boolean\`
70
+ Compacts paddings/heights.
71
+
72
+ ### \`positioning: { ... }\`
73
+ Controls how and where the bar is placed.
74
+
75
+ \`\`\`ts
76
+ type Positioning = {
77
+ mode?: 'sticky' | 'fixed'; // default: 'sticky'
78
+ topOffset?: number | string; // gap below the navbar; default: "0.25rem"
79
+ maxWidth?: number | string; // max width of the pill; default: 800
80
+ reserveSpace?: boolean; // if true, inserts a spacer to push content by bar height+offset
81
+ }
82
+ \`\`\`
83
+
84
+ **How placement works**
85
+ - Reads \`theme.layout.insets.nav\` to compute \`top\`.
86
+ - If a navbar is present (\`nav > 0\`), bar sits at \`nav + topOffset\`.
87
+ Without a navbar, it uses page top (no extra gap).
88
+ - In \`"fixed"\` mode, the bar is pinned and uses \`theme.layout.insets.left/right\` as **viewport paddings**.
89
+ - In \`"sticky"\` mode, the bar participates in normal layout flow and sticks when reaching the computed \`top\`.
90
+
91
+ ### \`behavior: { ... }\`
92
+ Optional scroll/visibility tuning.
93
+
94
+ \`\`\`ts
95
+ type Behavior = {
96
+ hideOnScrollDown?: boolean; // default: false
97
+ iconOnlyOnMobile?: boolean; // render icons-only on small screens
98
+ mobileBreakpoint?: number; // default: 768
99
+ hideThreshold?: number; // px scrolled down before hiding; default: 36
100
+ showThreshold?: number; // px scrolled up before showing again; default: 12
101
+ topGuard?: number; // do not hide when near top; default: 20
102
+ }
103
+ \`\`\`
104
+
105
+ ### \`theme: { ... }\`
106
+ Visual tuning with sensible defaults.
107
+
108
+ \`\`\`ts
109
+ type ThemeOpts = {
110
+ elevation?: number; // shadow depth; default: 28
111
+ blur?: number; // backdrop blur in px; default: 9
112
+ contrastMode?: 'auto'|'light'|'dark'; // (reserved for future)
113
+ }
114
+ \`\`\`
115
+
116
+ ### \`visibility: { ... }\`
117
+ Route‑aware gating (simple client‑side checks).
118
+
119
+ \`\`\`ts
120
+ type Visibility = {
121
+ enabled?: boolean; // default: true
122
+ includeRoutes?: string[] | null; // only show on these prefixes
123
+ excludeRoutes?: string[] | null; // hide on these prefixes
124
+ }
125
+ \`\`\`
126
+
127
+ ### \`i18n: { ... }\`
128
+ Optional translation hook.
129
+
130
+ \`\`\`ts
131
+ type I18n = {
132
+ useI18n?: boolean; // default: false
133
+ t?: (s: string) => string; // translate labels if provided
134
+ }
135
+ \`\`\`
136
+
137
+ ---
138
+
139
+ ## Theming & Insets
140
+
141
+ - The component **does not** manage insets itself. It reads them from \`theme.layout.insets\` which is kept in sync by your layout:
142
+ - \`NavBar\` reports its real height through \`theme.updateInsets({ nav })\`.
143
+ - \`LeftDrawer\` / \`RightDrawer\` report their widths through \`theme.updateInsets({ left/right })\`.
144
+ - For non‑MUI consumers, \`CustomThemeProvider\` also mirrors the values into CSS variables:
145
+ - \`--gui-inset-left\`, \`--gui-inset-right\`, and \`--gui-nav-height\`.
146
+
147
+ ---
148
+
149
+ ## Accessibility
150
+
151
+ - When rendering icon‑only actions, provide \`ariaLabel\` so the intent is announced by screen readers.
152
+ - Links include proper \`rel\` attributes when \`target="_blank"\`.
153
+
154
+ ---
155
+
156
+ ## Analytics
157
+
158
+ - When items have \`trackId\`, the component dispatches a DOM event:
159
+ \`window.dispatchEvent(new CustomEvent('stickyoptions:click', { detail: { trackId, label } }))\`.
160
+
161
+ ---
162
+
163
+ ## Defaults (quick reference)
164
+
165
+ - \`mobileVariant\`: \`"auto"\`
166
+ - \`dense\`: \`false\`
167
+ - \`positioning.mode\`: \`"sticky"\`
168
+ - \`positioning.topOffset\`: \`"0.25rem"\`
169
+ - \`positioning.maxWidth\`: \`800\`
170
+ - \`positioning.reserveSpace\`: \`false\`
171
+ - \`behavior.hideOnScrollDown\`: \`false\`
172
+ - \`behavior.mobileBreakpoint\`: \`768\`
173
+ - \`theme.elevation\`: \`28\`
174
+ - \`theme.blur\`: \`9\`
175
+ - \`visibility.enabled\`: \`true\`
176
+
177
+ ---
178
+
179
+ ## Usage
180
+
181
+ **Declarative icons**
182
+ \`\`\`jsx
183
+ <StickyOptionsTop
184
+ items={[
185
+ { icon: 'mui:BarChart', label: 'Stats', href: '/stats', iconColor: 'primary' },
186
+ { icon: 'lucide:bolt', label: 'Power', href: '/power', iconColor: '#ff9800' },
187
+ { icon: 'mui:Help', label: 'Help', href: 'https://help.example.com' },
188
+ ]}
189
+ />
190
+ \`\`\`
191
+
192
+ **With NavBar (sticky mode)**
193
+ \`\`\`jsx
194
+ <NavBar title="Demo" />
195
+ <Box sx={(theme) => ({ pt: \`\${theme?.layout?.insets?.nav ?? 0}px\` })}>
196
+ <StickyOptionsTop items={items} />
197
+ {/* page content */}
198
+ </Box>
199
+ \`\`\`
200
+
201
+ **Pinned to viewport (fixed mode)**
202
+ \`\`\`jsx
203
+ <StickyOptionsTop
204
+ items={items}
205
+ positioning={{ mode: 'fixed', topOffset: '0.25rem' }}
206
+ />
207
+ \`\`\`
208
+ `,
209
+ },
210
+ },
211
+ },
212
+ argTypes: {
213
+ items: {
214
+ control: 'object',
215
+ description:
216
+ 'List of actions. Each item: { icon, label, href, iconColor?, variant? }',
217
+ },
218
+ mobileVersion: {
219
+ control: { type: 'inline-radio' },
220
+ options: ['pill', 'icons'],
221
+ description:
222
+ 'Mobile layout. "pill" shows a pill bar with text; "icons" shows a compact icon-only bar.',
223
+ },
224
+ positioning: {
225
+ control: { type: 'object' },
226
+ description: 'Positioning config. Accepts `{ mode: "sticky" | "fixed" }`. Default is `{ mode: "sticky" }`.'
227
+ },
228
+ },
229
+ };
230
+
231
+ export default meta;
232
+
233
+ // Helpers ------------------------------------------------------------
234
+
235
+ type ItemType = {
236
+ icon: React.ReactNode | string;
237
+ label?: string;
238
+ href?: string;
239
+ iconColor?: string;
240
+ };
241
+
242
+ const ITEMS_BASE: ItemType[] = [
243
+ { icon: <Icon name="Settings" />, label: 'Settings', href: '/settings' },
244
+ { icon: <Icon name="camera" />, label: 'Capture', href: '/capture' },
245
+ { icon: <Icon name="Help" />, label: 'Help', href: 'https://help.neurons.me' },
246
+ ];
247
+
248
+ const ITEMS_BASE_MOBILE: ItemType[] = [
249
+ { icon: <Icon name="Settings" />, href: '/settings' },
250
+ { icon: <Icon name="camera" />, href: '/capture' },
251
+ { icon: <Icon name="Help" />, href: 'https://help.neurons.me' },
252
+ ];
253
+
254
+ const ITEMS_WITH_COLORS: ItemType[] = [
255
+ { icon: <Icon name="BarChart" iconColor="primary" />, label: 'Stats', href: '/stats' },
256
+ { icon: <Icon name="bolt" iconColor="#ff9800" />, label: 'Power', href: '/power' },
257
+ { icon: <Icon name="Insights" iconColor="info" />, label: 'Insights', href: '/insights' },
258
+ { icon: <Icon name="settings" />, label: 'Config', href: '/config' },
259
+ ];
260
+
261
+ const ITEMS_WITH_COLORS_MOBILE: ItemType[] = [
262
+ { icon: <Icon name="BarChart" iconColor="primary" />, href: '/stats' },
263
+ { icon: <Icon name="bolt" iconColor="#ff9800" />, href: '/power' },
264
+ { icon: <Icon name="Insights" iconColor="info" />, href: '/insights' },
265
+ { icon: <Icon name="settings" />, href: '/config' },
266
+ ];
267
+
268
+ const ITEMS_REACT_NODES: ItemType[] = [
269
+ {
270
+ icon: <Icon name="AttachMoney" iconColor="#43a047" />,
271
+ label: 'Billing',
272
+ href: '/billing',
273
+ },
274
+ {
275
+ icon: <Icon name="message-circle" iconColor="#1976d2" />,
276
+ label: 'Support',
277
+ href: '/support',
278
+ },
279
+ {
280
+ icon: <Icon name="CalendarMonth" />,
281
+ label: 'Calendar',
282
+ href: '/calendar',
283
+ },
284
+ ];
285
+
286
+ // Example container to simulate page content
287
+ const PageScaffold: React.FC<{ children: React.ReactNode }> = ({ children }) => (
288
+ <Box sx={{ minHeight: '100vh', bgcolor: 'background.default', color: 'text.primary' }}>
289
+ {children}
290
+ <Box sx={{ px: 3, py: 2 }}>
291
+ <Paper variant="outlined" sx={{ p: 2 }}>
292
+ <Typography variant="subtitle1" sx={{ fontWeight: 700, mb: 1 }}>
293
+ Demo content
294
+ </Typography>
295
+ <Typography variant="body2" sx={{ color: 'text.secondary' }}>
296
+ This card is just to simulate page content.
297
+ The *sticky* bar is center aligned and respects the insets of permanent drawers.
298
+ </Typography>
299
+ </Paper>
300
+ </Box>
301
+ </Box>
302
+ );
303
+
304
+ // Stories ------------------------------------------------------------
305
+
306
+ export const Default: StoryObj<typeof StickyOptionsTop> = {
307
+ args: {
308
+ items: ITEMS_BASE,
309
+ mobileVersion: 'pill',
310
+ },
311
+ render: (args) => (
312
+ <PageScaffold>
313
+ <StickyOptionsTop {...args} />
314
+ </PageScaffold>
315
+ ),
316
+ parameters: {
317
+ docs: {
318
+ description: {
319
+ story:
320
+ 'Basic usage with **declarative** icons. Without `iconColor`, icons react automatically to the theme (light/dark).',
321
+ },
322
+ },
323
+ },
324
+ };
325
+
326
+ export const WithIconColors: StoryObj<typeof StickyOptionsTop> = {
327
+ args: {
328
+ items: ITEMS_WITH_COLORS,
329
+ mobileVersion: 'pill',
330
+ },
331
+ render: (args) => (
332
+ <PageScaffold>
333
+ <StickyOptionsTop {...args} />
334
+ </PageScaffold>
335
+ ),
336
+ parameters: {
337
+ docs: {
338
+ description: {
339
+ story:
340
+ 'Declarative icons with `iconColor`. Accepts palette keys (`primary`, `info`, etc.) or any CSS color (`#ff9800`).',
341
+ },
342
+ },
343
+ },
344
+ };
345
+
346
+ export const ReactIconNodes: StoryObj<typeof StickyOptionsTop> = {
347
+ args: {
348
+ items: ITEMS_REACT_NODES,
349
+ mobileVersion: 'pill',
350
+ },
351
+ render: (args) => (
352
+ <PageScaffold>
353
+ <StickyOptionsTop {...args} />
354
+ </PageScaffold>
355
+ ),
356
+ parameters: {
357
+ docs: {
358
+ description: {
359
+ story:
360
+ '**ReactNode** mode: you can pass icon components directly. If you do not define an explicit color, the icon will follow the theme.',
361
+ },
362
+ },
363
+ },
364
+ };
365
+
366
+ export const DenseCompact: StoryObj<typeof StickyOptionsTop> = {
367
+ args: {
368
+ items: ITEMS_BASE,
369
+ mobileVersion: 'pill',
370
+ },
371
+ render: (args) => (
372
+ <PageScaffold>
373
+ <StickyOptionsTop {...args} />
374
+ </PageScaffold>
375
+ ),
376
+ parameters: {
377
+ docs: {
378
+ description: {
379
+ story:
380
+ '**Compact** variant with less padding. Useful when vertical space is limited or there are many actions.',
381
+ },
382
+ },
383
+ },
384
+ };
385
+
386
+ export const MobileFAB: StoryObj<typeof StickyOptionsTop> = {
387
+ name: 'Mobile — FAB',
388
+ args: {
389
+ items: ITEMS_WITH_COLORS_MOBILE,
390
+ mobileVersion: 'icons',
391
+ },
392
+ render: (args) => (
393
+ // Simple simulation of mobile viewport (max width) to avoid dependency on viewport addon
394
+ <Box sx={{ width: 390, mx: 'auto', border: '1px solid', borderColor: 'divider', borderRadius: 2, overflow: 'hidden' }}>
395
+ <PageScaffold>
396
+ <StickyOptionsTop {...args} />
397
+ <Box sx={{ p: 2 }}>
398
+ <Typography variant="body2" sx={{ color: 'text.secondary' }}>
399
+ Simulated **mobile** view (~390px). In \`mobileVariant="fab"\`, the component renders
400
+ a floating button with access to actions.
401
+ </Typography>
402
+ </Box>
403
+ </PageScaffold>
404
+ </Box>
405
+ ),
406
+ parameters: {
407
+ docs: {
408
+ description: {
409
+ story:
410
+ 'Forcing \`mobileVariant="fab"\` and simulating a narrow viewport to visualize mobile behavior without requiring addons.',
411
+ },
412
+ },
413
+ },
414
+ };
415
+
416
+ export const MobileInline: StoryObj<typeof StickyOptionsTop> = {
417
+ name: 'Mobile — Inline',
418
+ args: {
419
+ items: ITEMS_BASE_MOBILE,
420
+ mobileVersion: 'pill',
421
+ },
422
+ render: (args) => (
423
+ <Box sx={{ width: 390, mx: 'auto', border: '1px solid', borderColor: 'divider', borderRadius: 2, overflow: 'hidden' }}>
424
+ <PageScaffold>
425
+ <StickyOptionsTop {...args} />
426
+ <Box sx={{ p: 2 }}>
427
+ <Typography variant="body2" sx={{ color: 'text.secondary' }}>
428
+ Simulated **mobile** view (~390px). With \`mobileVariant="inline"\`, the bar stays
429
+ inline at the top.
430
+ </Typography>
431
+ </Box>
432
+ </PageScaffold>
433
+ </Box>
434
+ ),
435
+ parameters: {
436
+ docs: {
437
+ description: {
438
+ story:
439
+ 'Mobile behavior keeping the bar inline (no FAB).',
440
+ },
441
+ },
442
+ },
443
+ };
444
+
445
+ export const WithNavBar: StoryObj<typeof StickyOptionsTop> = {
446
+ args: {
447
+ items: ITEMS_WITH_COLORS,
448
+ mobileVersion: 'pill',
449
+ },
450
+ render: (args) => (
451
+ <PageScaffold>
452
+ <NavBar title="Demo App" />
453
+ <Box sx={(theme) => ({ pt: `${theme?.layout?.insets?.nav ?? 0}px` })}>
454
+ <StickyOptionsTop {...args} />
455
+ <Box sx={{ p: 2 }}>
456
+ {"Lorem ipsum dolor sit amet, consectetur adipiscing elit. ".repeat(100)}
457
+ </Box>
458
+ </Box>
459
+ </PageScaffold>
460
+ ),
461
+ parameters: {
462
+ docs: {
463
+ description: {
464
+ story:
465
+ 'Example with **NavBar** mounted. The sticky options bar now respects the nav inset (height of the AppBar) automatically.',
466
+ },
467
+ },
468
+ },
469
+ };