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,31 @@
1
+ // identity.ts — derive identityRoot = hash(secret + namespace)
2
+ // by suiGn
3
+ import { keccak_256 } from "js-sha3";
4
+ export interface IdentityInput {
5
+ secret: string;
6
+ namespace: string; // "username@hostname:port"
7
+ }
8
+
9
+ export interface IdentityResult {
10
+ namespace: string;
11
+ identityRoot: string;
12
+ }
13
+
14
+ /**
15
+ * Derives identityRoot using keccak256(secret + namespace)
16
+ */
17
+ export function deriveIdentity({ secret, namespace }: IdentityInput): IdentityResult {
18
+ const combined = secret + namespace;
19
+ const hash = keccak_256(combined);
20
+ const identityRoot = "0x" + hash;
21
+ // Log to browser console
22
+ if (typeof window !== "undefined") {
23
+ console.log("ME Identity Derived:");
24
+ console.log("secret:", secret);
25
+ console.log("namespace:", namespace);
26
+ const masked = "••••••••••••••••••••••••••••••••" + identityRoot.slice(-4);
27
+ console.log("identityRoot:", masked);
28
+ }
29
+
30
+ return { namespace, identityRoot };
31
+ }
@@ -0,0 +1,252 @@
1
+ import React from 'react';
2
+ import { Box, Slider } from '@mui/material';
3
+ interface VectorNode {
4
+ id: string;
5
+ children?: VectorNode[];
6
+ weight?: number;
7
+ frequency?: number;
8
+ lastUsed?: number;
9
+ }
10
+
11
+ interface VectorsOrbitProps {
12
+ vectors: VectorNode[];
13
+ visible?: boolean;
14
+ radius?: number; // distance from parent
15
+ level?: number; // recursion depth
16
+ containerSize?: number;
17
+ showControls?: boolean;
18
+ fitToContainer?: boolean;
19
+ squareOrbit?: {
20
+ size: number;
21
+ offsetX: number;
22
+ offsetY: number;
23
+ spiralFactor?: number;
24
+ };
25
+ }
26
+
27
+ const pulse = `
28
+ @keyframes pulse {
29
+ 0%, 100% { transform: scale(1); opacity: 0.9; }
30
+ 50% { transform: scale(1.15); opacity: 1; }
31
+ }
32
+ `;
33
+
34
+ const styles = `
35
+ ${pulse}
36
+ `;
37
+
38
+ const VectorsOrbit: React.FC<VectorsOrbitProps> = ({
39
+ vectors,
40
+ visible = true,
41
+ radius = 70,
42
+ level = 0,
43
+ containerSize = 140,
44
+ showControls = true,
45
+ fitToContainer = false,
46
+ squareOrbit,
47
+ }) => {
48
+ const [timeScale, setTimeScale] = React.useState(1); // vertical control
49
+ const [weightScale, setWeightScale] = React.useState(1); // horizontal control
50
+ const [viewMode, setViewMode] = React.useState<"icon" | "text">("icon");
51
+
52
+ if (!visible || vectors.length === 0) return null;
53
+
54
+ const enriched = vectors
55
+ .map(v => {
56
+ const last = v.lastUsed ?? Date.now();
57
+ const freq = v.frequency ?? 1;
58
+
59
+ const secondsSince = (Date.now() - last) / 1000;
60
+
61
+ // MASS = frequency density
62
+ const mass = freq / (1 + secondsSince);
63
+
64
+ // RECENCY for activation boost
65
+ const recency = 1 / (1 + secondsSince);
66
+
67
+ // WEIGHT combines both
68
+ const weight = mass + 2 * recency;
69
+
70
+ return { ...v, mass, weight };
71
+ })
72
+ .sort((a, b) => (b.weight ?? 0) - (a.weight ?? 0));
73
+
74
+ return (
75
+ <>
76
+ <style>{styles}</style>
77
+
78
+ {/* Controls */}
79
+ {showControls && (
80
+ <Box sx={{ position: "absolute", top: 10, left: 10, zIndex: 999, width: 'calc(100% - 20px)' }}>
81
+ <button
82
+ style={{
83
+ marginBottom: 6,
84
+ padding: "4px 10px",
85
+ background: "rgba(0,150,255,0.2)",
86
+ border: "1px solid rgba(0,150,255,0.4)",
87
+ borderRadius: 6,
88
+ cursor: "pointer",
89
+ color: "white",
90
+ fontSize: 12,
91
+ display: "block",
92
+ width: "100%"
93
+ }}
94
+ onClick={() =>
95
+ setViewMode(viewMode === "icon" ? "text" : "icon")
96
+ }
97
+ >
98
+ {viewMode === "icon" ? "TEXT VIEW" : "ICON VIEW"}
99
+ </button>
100
+ {/* Horizontal weight slider */}
101
+ <Box sx={{ width: "100%", mb: 2 }}>
102
+ <Slider
103
+ value={weightScale}
104
+ onChange={(e, v) => setWeightScale(v as number)}
105
+ min={0.2}
106
+ max={3}
107
+ step={0.1}
108
+ valueLabelDisplay="auto"
109
+ />
110
+ </Box>
111
+
112
+ {/* Vertical time slider */}
113
+ <Box
114
+ sx={{
115
+ height: 120,
116
+ display: "flex",
117
+ alignItems: "center",
118
+ }}
119
+ >
120
+ <Slider
121
+ orientation="vertical"
122
+ value={timeScale}
123
+ onChange={(e, v) => setTimeScale(v as number)}
124
+ min={0.2}
125
+ max={3}
126
+ step={0.1}
127
+ valueLabelDisplay="auto"
128
+ />
129
+ </Box>
130
+ </Box>
131
+ )}
132
+
133
+ <Box sx={{ position: "absolute", top: 0, left: 0, width: containerSize, height: containerSize }}>
134
+ {enriched.map((vector, i) => {
135
+ const bubbleOffset = viewMode === "icon"
136
+ ? (fitToContainer ? 9 : 13)
137
+ : (fitToContainer ? 16 : 20);
138
+ const bubbleRadius = viewMode === "icon" ? 13 : 16;
139
+
140
+ let centerX = containerSize / 2;
141
+ let centerY = containerSize / 2;
142
+
143
+ if (squareOrbit) {
144
+ const { size, offsetX, offsetY, spiralFactor = 0.25 } = squareOrbit;
145
+ const expandedSize = size * 1.6;
146
+ const perimeter = expandedSize * 4;
147
+ const step = perimeter / Math.max(1, enriched.length);
148
+ const distance = (i * step) % perimeter;
149
+
150
+ let px = 0;
151
+ let py = 0;
152
+ if (distance < expandedSize) {
153
+ px = distance;
154
+ py = 0;
155
+ } else if (distance < expandedSize * 2) {
156
+ px = expandedSize;
157
+ py = distance - expandedSize;
158
+ } else if (distance < expandedSize * 3) {
159
+ px = expandedSize - (distance - expandedSize * 2);
160
+ py = expandedSize;
161
+ } else {
162
+ px = 0;
163
+ py = expandedSize - (distance - expandedSize * 3);
164
+ }
165
+
166
+ const baseX = offsetX + px;
167
+ const baseY = offsetY + py;
168
+ const centerSquareX = offsetX + expandedSize / 2;
169
+ const centerSquareY = offsetY + expandedSize / 2;
170
+ const dx = baseX - centerSquareX;
171
+ const dy = baseY - centerSquareY;
172
+ const inward =
173
+ Math.min(0.85, ((i + 1) / Math.max(1, enriched.length)) * spiralFactor);
174
+ centerX = baseX - dx * inward;
175
+ centerY = baseY - dy * inward;
176
+ } else {
177
+ const maxRadius = containerSize / 2 - bubbleOffset;
178
+ const baseRadius = Math.min(radius + 8 * (vector.weight ?? 1), maxRadius);
179
+ const orbitRadius = fitToContainer ? maxRadius : baseRadius;
180
+ const theta = i * 0.75;
181
+ const x = Math.cos(theta) * orbitRadius * weightScale;
182
+ const y = Math.sin(theta) * orbitRadius * timeScale;
183
+ centerX = containerSize / 2 + x;
184
+ centerY = containerSize / 2 + y;
185
+ }
186
+
187
+ return (
188
+ <React.Fragment key={vector.id}>
189
+ {viewMode === "icon" ? (
190
+ <Box
191
+ sx={{
192
+ position: "absolute",
193
+ top: centerY - bubbleRadius,
194
+ left: centerX - bubbleRadius,
195
+ width: 26,
196
+ height: 26,
197
+ borderRadius: "50%",
198
+ border: "1px solid rgba(0,150,255,0.4)",
199
+ background: "rgba(0,150,255,0.1)",
200
+ backdropFilter: "blur(4px)",
201
+ display: "flex",
202
+ alignItems: "center",
203
+ justifyContent: "center",
204
+ fontSize: 11,
205
+ color: "#9ff6ff",
206
+ cursor: "pointer",
207
+ animation: "pulse 2.5s ease-in-out infinite",
208
+ transformOrigin: "center"
209
+ }}
210
+ >
211
+ {vector.id}
212
+ </Box>
213
+ ) : (
214
+ <Box
215
+ sx={{
216
+ position: "absolute",
217
+ top: centerY - bubbleRadius,
218
+ left: centerX - bubbleRadius,
219
+ padding: "6px 10px",
220
+ background: "rgba(0,50,90,0.6)",
221
+ border: "1px solid rgba(0,150,255,0.4)",
222
+ borderRadius: "6px",
223
+ fontSize: "11px",
224
+ color: "#bffaff",
225
+ maxWidth: 140
226
+ }}
227
+ >
228
+ <div><b>{vector.id}</b></div>
229
+ <div>mass: {vector.mass?.toFixed(3)}</div>
230
+ <div>weight: {vector.weight?.toFixed(3)}</div>
231
+ <div>freq: {vector.frequency ?? 1}</div>
232
+ </Box>
233
+ )}
234
+
235
+ {vector.children && vector.children.length > 0 && (
236
+ <VectorsOrbit
237
+ vectors={vector.children}
238
+ visible={true}
239
+ radius={radius * 0.9}
240
+ level={level + 1}
241
+ containerSize={containerSize}
242
+ />
243
+ )}
244
+ </React.Fragment>
245
+ );
246
+ })}
247
+ </Box>
248
+ </>
249
+ );
250
+ };
251
+
252
+ export default VectorsOrbit;
@@ -0,0 +1,314 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import React from "react";
3
+ import Triad from "../Triad";
4
+ import IconButton from "@mui/material/IconButton";
5
+ import Icon from "@/gui/Theme/Icon/Icon";
6
+ /**
7
+ * These stories focus on two things:
8
+ * 1) Triad UI states (online/offline/username available/exists) without needing a real ledger.
9
+ * 2) The core mental model you described: ME is a short-term thought machine.
10
+ * - Everything creates a Thought.
11
+ * - shortTermMemory is bounded (ring-buffer).
12
+ * - Only when you "cleak" do you persist.
13
+ */
14
+ const meta: Meta<typeof Triad> = {
15
+ title: "Identity Noise/Triad/me",
16
+ component: Triad,
17
+ parameters: {
18
+ layout: "centered",
19
+ },
20
+ };
21
+
22
+ export default meta;
23
+ type Story = StoryObj<typeof Triad>;
24
+ // ------------------------------------------------------------
25
+ // Triad stories
26
+ // ------------------------------------------------------------
27
+ export const Default: Story = {
28
+ name: "Default (blockchain input collapsed)",
29
+ args: {},
30
+ };
31
+
32
+ export const WithBlockchainInputOpen: Story = {
33
+ name: "Blockchain input open",
34
+ render: () => {
35
+ return <Triad />;
36
+ },
37
+ };
38
+
39
+ export const OfflineBlockchain: Story = {
40
+ name: "Offline blockchain (simulated)",
41
+ render: () => (
42
+ <WithFetchMock mode="offline">
43
+ <Triad />
44
+ </WithFetchMock>
45
+ ),
46
+ };
47
+
48
+ export const OnlineBlockchainUsernameAvailable: Story = {
49
+ name: "Online blockchain + username available (simulated)",
50
+ render: () => (
51
+ <WithFetchMock mode="available">
52
+ <Triad />
53
+ </WithFetchMock>
54
+ ),
55
+ };
56
+
57
+ export const OnlineBlockchainUsernameExists: Story = {
58
+ name: "Online blockchain + username exists (simulated)",
59
+ render: () => (
60
+ <WithFetchMock mode="exists">
61
+ <Triad />
62
+ </WithFetchMock>
63
+ ),
64
+ };
65
+
66
+ /**
67
+ * Minimal fetch mock for Triad's endpoints:
68
+ * - GET http://<host>/
69
+ * - GET http://<host>/users/<username>
70
+ */
71
+ function WithFetchMock({
72
+ mode,
73
+ children,
74
+ }: {
75
+ mode: "offline" | "available" | "exists";
76
+ children: React.ReactNode;
77
+ }) {
78
+ const originalFetch = React.useRef<typeof fetch | null>(null);
79
+ React.useEffect(() => {
80
+ originalFetch.current = globalThis.fetch;
81
+ globalThis.fetch = (async (input: any, init?: any) => {
82
+ const url = String(typeof input === "string" ? input : input?.url ?? "");
83
+ if (mode === "offline") {
84
+ return Promise.reject(new TypeError("Failed to fetch"));
85
+ }
86
+ // Root ping
87
+ if (url.endsWith("/")) {
88
+ return new Response("ok", { status: 200 });
89
+ }
90
+ // Username lookup
91
+ const m = url.match(/\/users\/([^/?#]+)/);
92
+ if (m) {
93
+ if (mode === "exists") return new Response("exists", { status: 200 });
94
+ if (mode === "available") return new Response("not found", { status: 404 });
95
+ }
96
+
97
+ return originalFetch.current!(input, init);
98
+ }) as any;
99
+ return () => {
100
+ if (originalFetch.current) globalThis.fetch = originalFetch.current;
101
+ };
102
+ }, [mode]);
103
+ return <>{children}</>;
104
+ }
105
+
106
+ // ------------------------------------------------------------
107
+ // ME thought model story (no Triad dependency)
108
+ // ------------------------------------------------------------
109
+ export const ThoughtModel_RingBufferAndCleak: Story = {
110
+ name: "ME thought model: ring-buffer + cleak concept (explain)",
111
+ render: () => <ThoughtModelWithInfoCorner />, // purely explanatory + simulated
112
+ parameters: {
113
+ layout: "padded",
114
+ },
115
+ };
116
+
117
+ function ThoughtModelWithInfoCorner() {
118
+ const [open, setOpen] = React.useState(false);
119
+ return (
120
+ <div style={{ position: "relative" }}>
121
+ <div
122
+ style={{
123
+ position: "absolute",
124
+ top: 8,
125
+ right: 8,
126
+ zIndex: 10,
127
+ display: "flex",
128
+ alignItems: "center",
129
+ gap: 8,
130
+ }}
131
+ >
132
+ {open && (
133
+ <div
134
+ style={{
135
+ maxWidth: 520,
136
+ padding: "10px 12px",
137
+ borderRadius: 12,
138
+ border: "1px solid rgba(127,127,127,0.35)",
139
+ background: "rgba(0,0,0,0.04)",
140
+ backdropFilter: "blur(6px)",
141
+ fontSize: 12,
142
+ lineHeight: 1.35,
143
+ }}
144
+ >
145
+ <div style={{ whiteSpace: "pre-wrap" }}>
146
+ {"Your idea: everything creates a Thought and goes into shortTermMemory. We don't worry about overflow because STM is a fixed-size ring buffer. If you never \"cleak\", the thoughts eventually fall out of STM. When you cleak, you persist the current state / snapshot elsewhere (ledger, disk, chain, etc.)."}
147
+ </div>
148
+ </div>
149
+ )}
150
+
151
+ <IconButton
152
+ aria-label={open ? "Hide info" : "Show info"}
153
+ onClick={() => setOpen((v) => !v)}
154
+ size="small"
155
+ sx={{
156
+ borderRadius: "10px",
157
+ border: "1px solid",
158
+ borderColor: "divider",
159
+ bgcolor: "background.paper",
160
+ color: "text.secondary",
161
+ boxShadow: 1,
162
+ "&:hover": {
163
+ bgcolor: "background.nav",
164
+ color: "text.primary",
165
+ },
166
+ }}
167
+ >
168
+ <Icon name={open ? "info" : "info"} fontSize={18} />
169
+ </IconButton>
170
+ </div>
171
+
172
+ <ThoughtModelDemo />
173
+ </div>
174
+ );
175
+ }
176
+
177
+ /**
178
+ * This is a UI-less demo of the mental model:
179
+ * - Every action yields a Thought
180
+ * - shortTermMemory is bounded (ring buffer)
181
+ * - selecting "cleak" copies current STM to persisted storage
182
+ *
183
+ * This does NOT import the ME runtime; it's a storybook explainer.
184
+ * (Keeps story stable even if ME typing/runtime changes.)
185
+ */
186
+ function ThoughtModelDemo() {
187
+ type Thought = {
188
+ id: number;
189
+ path: string;
190
+ operator: string | null;
191
+ expression: any;
192
+ timestamp: number;
193
+ };
194
+ const MAX = 12;
195
+ const [stm, setStm] = React.useState<Thought[]>([]);
196
+ const [persisted, setPersisted] = React.useState<Thought[][]>([]);
197
+ const [counter, setCounter] = React.useState(0);
198
+ const pushThought = React.useCallback((t: Omit<Thought, "id" | "timestamp">) => {
199
+ setStm((prev) => {
200
+ const next: Thought[] = [
201
+ ...prev,
202
+ {
203
+ id: Date.now() + Math.floor(Math.random() * 1000),
204
+ timestamp: Date.now(),
205
+ ...t,
206
+ },
207
+ ];
208
+ // ring buffer
209
+ return next.length <= MAX ? next : next.slice(next.length - MAX);
210
+ });
211
+ }, []);
212
+
213
+ const fakeOps = React.useMemo(
214
+ () => [
215
+ () => pushThought({ path: "", operator: "@", expression: "jabellae" }),
216
+ () => pushThought({ path: "", operator: "_", expression: "••••" }),
217
+ () => pushThought({ path: "profile.name", operator: null, expression: "Abella" }),
218
+ () => pushThought({ path: "wallet.income", operator: null, expression: 1000 }),
219
+ () => pushThought({ path: "wallet.expenses.rent", operator: null, expression: 500 }),
220
+ () => pushThought({ path: "wallet.net", operator: "=", expression: "wallet.income - wallet.expenses.rent" }),
221
+ () => pushThought({ path: "wallet.hidden.notes", operator: "-", expression: "-" }),
222
+ () => pushThought({ path: "", operator: "~", expression: "noise" }),
223
+ ],
224
+ [pushThought]
225
+ );
226
+
227
+ return (
228
+ <div style={{ fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace" }}>
229
+ <h3 style={{ marginTop: 0 }}>ME thought model (concept)</h3>
230
+ <p style={{ maxWidth: 860, lineHeight: 1.35, opacity: 0.9 }}>
231
+ <b>Everything creates a Thought</b> and goes into <b>ShortTermMemory</b>. We don't worry about overflow
232
+ because STM is a <b>fixed-size ring buffer</b>. If you never "cleak", the thoughts eventually fall out of STM.
233
+ When you <b>cleak</b>, you persist the current state / snapshot elsewhere (ledger, disk, chain, etc.).
234
+ </p>
235
+
236
+ <div style={{ display: "flex", gap: 12, flexWrap: "wrap", marginBottom: 10 }}>
237
+ <button
238
+ onClick={() => {
239
+ const op = fakeOps[counter % fakeOps.length];
240
+ op();
241
+ setCounter((c) => c + 1);
242
+ }}
243
+ >
244
+ Push Thought
245
+ </button>
246
+ <button
247
+ onClick={() => {
248
+ setPersisted((p) => [...p, stm]);
249
+ }}
250
+ disabled={stm.length === 0}
251
+ >
252
+ Cleak (persist snapshot)
253
+ </button>
254
+ <button
255
+ onClick={() => {
256
+ setStm([]);
257
+ }}
258
+ >
259
+ Drop STM (simulate losing memory)
260
+ </button>
261
+ </div>
262
+
263
+ <div style={{ display: "flex", gap: 16, flexWrap: "wrap" }}>
264
+ <div style={{ minWidth: 360, flex: 1 }}>
265
+ <div style={{ marginBottom: 6, opacity: 0.85 }}>
266
+ STM(ShortTermMemory) (max {MAX}) — current size: {stm.length}
267
+ </div>
268
+ <div style={{ border: "1px solid rgba(127,127,127,0.35)", borderRadius: 10, padding: 10 }}>
269
+ {stm.length === 0 ? (
270
+ <div style={{ opacity: 0.7 }}>No thoughts yet.</div>
271
+ ) : (
272
+ <ol style={{ margin: 0, paddingLeft: 18 }}>
273
+ {stm.map((t) => (
274
+ <li key={t.id} style={{ marginBottom: 6 }}>
275
+ <span style={{ opacity: 0.85 }}>
276
+ {new Date(t.timestamp).toLocaleTimeString()} · {t.path || "<root>"} · {t.operator ?? "∅"} ·
277
+ </span>{" "}
278
+ <span style={{ opacity: 1 }}>{String(t.expression)}</span>
279
+ </li>
280
+ ))}
281
+ </ol>
282
+ )}
283
+ </div>
284
+ </div>
285
+
286
+ <div style={{ minWidth: 360, flex: 1 }}>
287
+ <div style={{ marginBottom: 6, opacity: 0.85 }}>persisted snapshots (Cleaks): {persisted.length}</div>
288
+ <div style={{ border: "1px solid rgba(127,127,127,0.35)", borderRadius: 10, padding: 10 }}>
289
+ {persisted.length === 0 ? (
290
+ <div style={{ opacity: 0.7 }}>No cleaks yet.</div>
291
+ ) : (
292
+ persisted
293
+ .slice()
294
+ .reverse()
295
+ .map((snap, i) => (
296
+ <div key={i} style={{ marginBottom: 12 }}>
297
+ <div style={{ marginBottom: 4, opacity: 0.85 }}>snapshot #{persisted.length - i} (size {snap.length})</div>
298
+ <div style={{ opacity: 0.9, fontSize: 12 }}>
299
+ {snap.map((t) => `${t.path || "<root>"}${t.operator ? `:${t.operator}` : ""}`).join(" · ")}
300
+ </div>
301
+ </div>
302
+ ))
303
+ )}
304
+ </div>
305
+ </div>
306
+ </div>
307
+
308
+ <div style={{ marginTop: 12, maxWidth: 860, lineHeight: 1.35, opacity: 0.9 }}>
309
+ <b>Key invariant:</b> the runtime can be noisy and ephemeral; the <b>ledger persistence</b> should only happen on a
310
+ deliberate act (Cleak) and should serialize a stable representation (thoughts, encrypted branches, indexes, etc.).
311
+ </div>
312
+ </div>
313
+ );
314
+ }
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This.GUI — Organisms registry
3
+ * High-level UI compositions built from molecules and atoms.
4
+ * Exported here so consumers can import from a single namespace.
5
+ */
6
+
7
+
8
+ const Organisms = {
9
+ };
10
+
11
+ export {
12
+ Organisms,
13
+ };
14
+
15
+ export default Organisms;
@@ -0,0 +1,40 @@
1
+ // src/themes/contexts/InsetsContext.tsx
2
+ import React, { createContext, useContext, useState, useCallback, useEffect } from 'react';
3
+ type Insets = { top: number; right: number; bottom: number; left: number; nav: number };
4
+ type InsetsContextType = {
5
+ insets: Insets;
6
+ updateInsets: (next: Partial<Insets>) => void;
7
+ };
8
+
9
+ export const InsetsContext = createContext<InsetsContextType | undefined>(undefined);
10
+
11
+ export const InsetsProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
12
+ const [insets, setInsets] = useState<Insets>({ top: 0, right: 0, bottom: 0, left: 0, nav: 0 });
13
+
14
+ const updateInsets = useCallback((next: Partial<Insets>) => {
15
+ setInsets((prev) => ({ ...prev, ...next }));
16
+ }, []);
17
+
18
+ useEffect(() => {
19
+ const { top, right, bottom, left, nav } = insets;
20
+ document.documentElement.style.setProperty('--gui-inset-top', `${top}px`);
21
+ document.documentElement.style.setProperty('--gui-inset-right', `${right}px`);
22
+ document.documentElement.style.setProperty('--gui-inset-bottom', `${bottom}px`);
23
+ document.documentElement.style.setProperty('--gui-inset-left', `${left}px`);
24
+ document.documentElement.style.setProperty('--gui-nav-height', `${nav || top}px`);
25
+ }, [insets]);
26
+
27
+ return (
28
+ <InsetsContext.Provider value={{ insets, updateInsets }}>
29
+ {children}
30
+ </InsetsContext.Provider>
31
+ );
32
+ };
33
+
34
+ export const useInsetsContext = () => {
35
+ const context = useContext(InsetsContext);
36
+ if (!context) {
37
+ throw new Error('useInsetsContext must be used within an InsetsProvider');
38
+ }
39
+ return context;
40
+ };
@@ -0,0 +1,20 @@
1
+ // src/gui/contexts/LeftSidebarContext.tsx
2
+ import React, { createContext, useState } from 'react';
3
+ export type LeftSidebarView = 'rail' | 'expanded' | 'mobile';
4
+ export type LeftSidebarContextType = {
5
+ view: LeftSidebarView;
6
+ setView: (view: LeftSidebarView) => void;
7
+ };
8
+
9
+ export const LeftSidebarContext = createContext<LeftSidebarContextType | undefined>(undefined);
10
+ export const LeftSidebarProvider: React.FC<{ children: React.ReactNode; initialView?: LeftSidebarView }> = ({
11
+ children,
12
+ initialView = 'rail',
13
+ }) => {
14
+ const [view, setView] = useState<LeftSidebarView>(initialView);
15
+ return (
16
+ <LeftSidebarContext.Provider value={{ view, setView }}>
17
+ {children}
18
+ </LeftSidebarContext.Provider>
19
+ );
20
+ };