this.gui 1.3.24 → 1.3.26

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 (284) hide show
  1. package/dist/this-gui.es.js +0 -1
  2. package/dist/this-gui.umd.js +65 -65
  3. package/index.ts +3 -2
  4. package/init/index.html +1 -2
  5. package/init/package-lock.json +2 -2
  6. package/init/package.json +1 -1
  7. package/init/src/App.tsx +24 -0
  8. package/init/src/index.css +16 -0
  9. package/init/src/main.tsx +14 -0
  10. package/init/src/router/DerivableRouter.tsx +36 -0
  11. package/package.json +1 -1
  12. package/src/GUI.tsx +15 -0
  13. package/src/components/generics/Cards/Gridme.jsx +52 -0
  14. package/src/components/generics/Cards/LilBox.jsx +65 -0
  15. package/src/components/generics/Cards/ModuleCard.jsx +106 -0
  16. package/src/components/generics/Chats/FullChatBot.jsx +223 -0
  17. package/src/components/generics/Code/CodeBlock.jsx +33 -0
  18. package/src/components/generics/Feedback/Callout.jsx +92 -0
  19. package/src/components/generics/Layout/GridX.jsx +29 -0
  20. package/src/components/generics/Layout/Hero2.jsx +132 -0
  21. package/src/components/generics/Layout/PageContainer.jsx +29 -0
  22. package/src/components/generics/Layout/PageDivider.jsx +20 -0
  23. package/src/components/generics/Layout/Section.jsx +43 -0
  24. package/src/components/generics/Layout/SectionHeader.jsx +21 -0
  25. package/src/components/generics/Media/Img.jsx +58 -0
  26. package/src/components/generics/Media/VideoEmbed.jsx +51 -0
  27. package/src/components/generics/Organization/TableOfContents.jsx +51 -0
  28. package/src/components/generics/Organization/Tabs.jsx +45 -0
  29. package/src/components/generics/Text/TextList.jsx +41 -0
  30. package/src/components/generics/Text/TextParagraph.jsx +28 -0
  31. package/src/components/generics/Text/TextQuote.jsx +23 -0
  32. package/src/components/generics/Text/TextTitle.jsx +44 -0
  33. package/src/gui/Layouts/ResponsiveUI/Content/Content.resolver.tsx +0 -0
  34. package/src/gui/Layouts/ResponsiveUI/Content/Content.stories.tsx +88 -0
  35. package/src/gui/Layouts/ResponsiveUI/Content/Content.tsx +53 -0
  36. package/src/gui/Layouts/ResponsiveUI/Content/Content.types.tsx +40 -0
  37. package/src/gui/Layouts/ResponsiveUI/Footer/Footer.resolver.tsx +45 -0
  38. package/src/gui/Layouts/ResponsiveUI/Footer/Footer.stories.tsx +209 -0
  39. package/src/gui/Layouts/ResponsiveUI/Footer/Footer.tsx +337 -0
  40. package/src/gui/Layouts/ResponsiveUI/Footer/Footer.types.ts +40 -0
  41. package/src/gui/Layouts/ResponsiveUI/Layout/Layout.resolver.tsx +37 -0
  42. package/src/gui/Layouts/ResponsiveUI/Layout/Layout.stories.tsx +290 -0
  43. package/src/gui/Layouts/ResponsiveUI/Layout/Layout.tsx +112 -0
  44. package/src/gui/Layouts/ResponsiveUI/Layout/Layout.types.ts +56 -0
  45. package/src/gui/Layouts/ResponsiveUI/Layout/useLayoutBreakpoints.ts +9 -0
  46. package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/LeftSidebar.resolver.tsx +87 -0
  47. package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/LeftSidebar.stories.tsx +199 -0
  48. package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/LeftSidebar.tsx +311 -0
  49. package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/LeftSidebar.types.ts +41 -0
  50. package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/SidebarToggleButton.tsx +53 -0
  51. package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.resolver.tsx +19 -0
  52. package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.tsx +107 -0
  53. package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.resolver.tsx +0 -0
  54. package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.tsx +122 -0
  55. package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.types.ts +13 -0
  56. package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarMenu/LeftSidebarMenu.tsx +142 -0
  57. package/src/gui/Layouts/ResponsiveUI/Sidebars/LeftSidebar/components/LeftSidebarToggleButton/LeftSidebarToggleButton.tsx +23 -0
  58. package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/RightSidebar.resolver.tsx +35 -0
  59. package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/RightSidebar.stories.tsx +240 -0
  60. package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/RightSidebar.tsx +319 -0
  61. package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/RightSidebar.types.ts +17 -0
  62. package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/components/RightSidebarAction/RightSidebarAction.tsx +102 -0
  63. package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/components/RightSidebarLink/RightSidebarLink.tsx +132 -0
  64. package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/components/RightSidebarMenu/RightSidebarMenu.tsx +140 -0
  65. package/src/gui/Layouts/ResponsiveUI/Sidebars/RightSidebar/components/RightSidebarToggleButton/RightSidebarToggleButton.tsx +22 -0
  66. package/src/gui/Layouts/ResponsiveUI/StickyOptions/StickyOptionsTop.stories.tsx +469 -0
  67. package/src/gui/Layouts/ResponsiveUI/StickyOptions/StickyOptionsTop.tsx +489 -0
  68. package/src/gui/Layouts/ResponsiveUI/TopBar/TopBar.resolver.tsx +86 -0
  69. package/src/gui/Layouts/ResponsiveUI/TopBar/TopBar.stories.tsx +350 -0
  70. package/src/gui/Layouts/ResponsiveUI/TopBar/TopBar.tsx +281 -0
  71. package/src/gui/Layouts/ResponsiveUI/TopBar/TopBar.types.ts +39 -0
  72. package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarAction/TopBarAction.stories.tsx +83 -0
  73. package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarAction/TopBarAction.tsx +18 -0
  74. package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarAction/TopBarAction.types.ts +4 -0
  75. package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarLink/TopBarLink.stories.tsx +189 -0
  76. package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarLink/TopBarLink.tsx +30 -0
  77. package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarLink/TopBarLink.types.ts +9 -0
  78. package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarMenu/TopBarMenu.resolver.tsx +14 -0
  79. package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarMenu/TopBarMenu.stories.tsx +56 -0
  80. package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarMenu/TopBarMenu.tsx +123 -0
  81. package/src/gui/Layouts/ResponsiveUI/TopBar/components/TopBarMenu/TopBarMenu.types.ts +44 -0
  82. package/src/gui/Theme/GuiProvider.tsx +125 -0
  83. package/src/gui/Theme/Icon/Icon.resolver.tsx +29 -0
  84. package/src/gui/Theme/Icon/Icon.tsx +43 -0
  85. package/src/gui/Theme/catalog/CherryByte/CherryByte.png +0 -0
  86. package/src/gui/Theme/catalog/CherryByte/dark.tokens.ts +47 -0
  87. package/src/gui/Theme/catalog/CherryByte/light.tokens.ts +47 -0
  88. package/src/gui/Theme/catalog/CherryByte/manifest.ts +24 -0
  89. package/src/gui/Theme/catalog/GhostShell/dark.tokens.ts +43 -0
  90. package/src/gui/Theme/catalog/GhostShell/ghost.png +0 -0
  91. package/src/gui/Theme/catalog/GhostShell/light.tokens.ts +39 -0
  92. package/src/gui/Theme/catalog/GhostShell/manifest.ts +24 -0
  93. package/src/gui/Theme/catalog/LunaHex/LunaHex.png +0 -0
  94. package/src/gui/Theme/catalog/LunaHex/dark.tokens.ts +34 -0
  95. package/src/gui/Theme/catalog/LunaHex/light.tokens.ts +74 -0
  96. package/src/gui/Theme/catalog/LunaHex/manifest.ts +24 -0
  97. package/src/gui/Theme/catalog/MUI/MUI.png +0 -0
  98. package/src/gui/Theme/catalog/MUI/dark.tokens.ts +58 -0
  99. package/src/gui/Theme/catalog/MUI/light.tokens.ts +74 -0
  100. package/src/gui/Theme/catalog/MUI/manifest.ts +24 -0
  101. package/src/gui/Theme/catalog/PrinceOfDarkness/dark.tokens.ts +48 -0
  102. package/src/gui/Theme/catalog/PrinceOfDarkness/light.tokens.ts +47 -0
  103. package/src/gui/Theme/catalog/PrinceOfDarkness/manifest.ts +24 -0
  104. package/src/gui/Theme/catalog/PrinceOfDarkness/prince.png +0 -0
  105. package/src/gui/Theme/catalog/PrinceOfDarkness/princeOfDarkness.png +0 -0
  106. package/src/gui/Theme/catalog/Seafoam/dark.tokens.ts +49 -0
  107. package/src/gui/Theme/catalog/Seafoam/light.tokens.ts +47 -0
  108. package/src/gui/Theme/catalog/Seafoam/manifest.ts +24 -0
  109. package/src/gui/Theme/catalog/Seafoam/seaFoam.png +0 -0
  110. package/src/gui/Theme/catalog/neurons/dark.tokens.ts +58 -0
  111. package/src/gui/Theme/catalog/neurons/light.tokens.ts +74 -0
  112. package/src/gui/Theme/catalog/neurons/manifest.ts +24 -0
  113. package/src/gui/Theme/catalog/neurons/neurons.me.png +0 -0
  114. package/src/gui/Theme/fromTokens.ts +273 -0
  115. package/src/gui/Theme/gui.css +31 -0
  116. package/src/gui/Theme/index.ts +17 -0
  117. package/src/gui/Theme/styles/buildShadows.ts +83 -0
  118. package/src/gui/Theme/styles/theme.tokens.ts +108 -0
  119. package/src/gui/Theme/utils/catalog.ts +61 -0
  120. package/src/gui/Theme/utils/persistence.ts +66 -0
  121. package/src/gui/Theme/utils/themeUtils.ts +34 -0
  122. package/src/gui/apis/codegen.api.ts +38 -0
  123. package/src/gui/components/atoms/AppBar/AppBar.resolver.tsx +41 -0
  124. package/src/gui/components/atoms/AppBar/AppBar.stories.tsx +225 -0
  125. package/src/gui/components/atoms/AppBar/AppBar.tsx +8 -0
  126. package/src/gui/components/atoms/AppBar/AppBar.types.ts +28 -0
  127. package/src/gui/components/atoms/Avatar/Avatar.resolver.tsx +61 -0
  128. package/src/gui/components/atoms/Avatar/Avatar.stories.tsx +36 -0
  129. package/src/gui/components/atoms/Avatar/Avatar.tsx +14 -0
  130. package/src/gui/components/atoms/Box/Box.resolver.tsx +171 -0
  131. package/src/gui/components/atoms/Box/Box.stories.tsx +263 -0
  132. package/src/gui/components/atoms/Box/Box.tsx +15 -0
  133. package/src/gui/components/atoms/Button/Button.resolver.tsx +103 -0
  134. package/src/gui/components/atoms/Button/Button.stories.tsx +219 -0
  135. package/src/gui/components/atoms/Button/Button.tsx +40 -0
  136. package/src/gui/components/atoms/Card/Card.resolver.tsx +63 -0
  137. package/src/gui/components/atoms/Card/Card.stories.tsx +54 -0
  138. package/src/gui/components/atoms/Card/Card.tsx +13 -0
  139. package/src/gui/components/atoms/CardActions/CardActions.resolver.tsx +59 -0
  140. package/src/gui/components/atoms/CardActions/CardActions.stories.tsx +32 -0
  141. package/src/gui/components/atoms/CardActions/CardActions.tsx +14 -0
  142. package/src/gui/components/atoms/CardContent/CardContent.resolver.tsx +60 -0
  143. package/src/gui/components/atoms/CardContent/CardContent.stories.tsx +34 -0
  144. package/src/gui/components/atoms/CardContent/CardContent.tsx +13 -0
  145. package/src/gui/components/atoms/CardHeader/CardHeader.resolver.tsx +68 -0
  146. package/src/gui/components/atoms/CardHeader/CardHeader.stories.tsx +40 -0
  147. package/src/gui/components/atoms/CardHeader/CardHeader.tsx +12 -0
  148. package/src/gui/components/atoms/Collapse/Collapse.resolver.tsx +85 -0
  149. package/src/gui/components/atoms/Collapse/Collapse.stories.tsx +130 -0
  150. package/src/gui/components/atoms/Collapse/Collapse.tsx +17 -0
  151. package/src/gui/components/atoms/Divider/Divider.resolver.tsx +95 -0
  152. package/src/gui/components/atoms/Divider/Divider.stories.tsx +108 -0
  153. package/src/gui/components/atoms/Divider/Divider.tsx +14 -0
  154. package/src/gui/components/atoms/Drawer/Drawer.resolver.tsx +116 -0
  155. package/src/gui/components/atoms/Drawer/Drawer.stories.tsx +223 -0
  156. package/src/gui/components/atoms/Drawer/Drawer.tsx +25 -0
  157. package/src/gui/components/atoms/Grid/Grid.resolver.tsx +33 -0
  158. package/src/gui/components/atoms/Grid/Grid.stories.tsx +136 -0
  159. package/src/gui/components/atoms/Grid/Grid.tsx +15 -0
  160. package/src/gui/components/atoms/Grid/Grid.types.ts +9 -0
  161. package/src/gui/components/atoms/IconButton/IconButton.resolver.tsx +137 -0
  162. package/src/gui/components/atoms/IconButton/IconButton.stories.tsx +134 -0
  163. package/src/gui/components/atoms/IconButton/IconButton.tsx +22 -0
  164. package/src/gui/components/atoms/Link/Link.resolver.tsx +74 -0
  165. package/src/gui/components/atoms/Link/Link.stories.tsx +157 -0
  166. package/src/gui/components/atoms/Link/Link.tsx +36 -0
  167. package/src/gui/components/atoms/List/List.resolver.tsx +94 -0
  168. package/src/gui/components/atoms/List/List.stories.tsx +137 -0
  169. package/src/gui/components/atoms/List/List.tsx +20 -0
  170. package/src/gui/components/atoms/ListItem/ListItem.resolver.tsx +88 -0
  171. package/src/gui/components/atoms/ListItem/ListItem.stories.tsx +151 -0
  172. package/src/gui/components/atoms/ListItem/ListItem.tsx +19 -0
  173. package/src/gui/components/atoms/ListItemButton/ListItemButton.resolver.tsx +214 -0
  174. package/src/gui/components/atoms/ListItemButton/ListItemButton.stories.tsx +155 -0
  175. package/src/gui/components/atoms/ListItemButton/ListItemButton.tsx +15 -0
  176. package/src/gui/components/atoms/ListItemIcon/ListItemIcon.resolver.tsx +102 -0
  177. package/src/gui/components/atoms/ListItemIcon/ListItemIcon.stories.tsx +132 -0
  178. package/src/gui/components/atoms/ListItemIcon/ListItemIcon.tsx +11 -0
  179. package/src/gui/components/atoms/ListItemText/ListItemText.resolver.tsx +112 -0
  180. package/src/gui/components/atoms/ListItemText/ListItemText.stories.tsx +156 -0
  181. package/src/gui/components/atoms/ListItemText/ListItemText.tsx +15 -0
  182. package/src/gui/components/atoms/Menu/Menu.resolver.tsx +112 -0
  183. package/src/gui/components/atoms/Menu/Menu.stories.tsx +162 -0
  184. package/src/gui/components/atoms/Menu/Menu.tsx +17 -0
  185. package/src/gui/components/atoms/MenuItem/MenuItem.resolver.tsx +183 -0
  186. package/src/gui/components/atoms/MenuItem/MenuItem.stories.tsx +134 -0
  187. package/src/gui/components/atoms/MenuItem/MenuItem.tsx +14 -0
  188. package/src/gui/components/atoms/Paper/Paper.resolver.tsx +98 -0
  189. package/src/gui/components/atoms/Paper/Paper.stories.tsx +184 -0
  190. package/src/gui/components/atoms/Paper/Paper.tsx +15 -0
  191. package/src/gui/components/atoms/Section/Section.resolver.tsx +10 -0
  192. package/src/gui/components/atoms/Section/Section.stories.tsx +189 -0
  193. package/src/gui/components/atoms/Section/Section.tsx +76 -0
  194. package/src/gui/components/atoms/Section/Section.types.tsx +24 -0
  195. package/src/gui/components/atoms/Stack/Stack.resolver.tsx +94 -0
  196. package/src/gui/components/atoms/Stack/Stack.stories.tsx +160 -0
  197. package/src/gui/components/atoms/Stack/Stack.tsx +15 -0
  198. package/src/gui/components/atoms/Surface/Surface.resolver.tsx +37 -0
  199. package/src/gui/components/atoms/Surface/Surface.tsx +49 -0
  200. package/src/gui/components/atoms/Surface/Surface.types.ts +20 -0
  201. package/src/gui/components/atoms/Switch/Switch.resolver.tsx +53 -0
  202. package/src/gui/components/atoms/Switch/Switch.stories.tsx +236 -0
  203. package/src/gui/components/atoms/Switch/Switch.tsx +22 -0
  204. package/src/gui/components/atoms/TextField/TextField.stories.tsx +28 -0
  205. package/src/gui/components/atoms/TextField/TextField.tsx +15 -0
  206. package/src/gui/components/atoms/Toolbar/Toolbar.resolver.tsx +60 -0
  207. package/src/gui/components/atoms/Toolbar/Toolbar.stories.tsx +155 -0
  208. package/src/gui/components/atoms/Toolbar/Toolbar.tsx +16 -0
  209. package/src/gui/components/atoms/Tooltip/Tooltip.resolver.tsx +142 -0
  210. package/src/gui/components/atoms/Tooltip/Tooltip.stories.tsx +117 -0
  211. package/src/gui/components/atoms/Tooltip/Tooltip.tsx +70 -0
  212. package/src/gui/components/atoms/Typography/Typography.resolver.tsx +158 -0
  213. package/src/gui/components/atoms/Typography/Typography.stories.tsx +222 -0
  214. package/src/gui/components/atoms/Typography/Typography.tsx +27 -0
  215. package/src/gui/components/atoms.tsx +138 -0
  216. package/src/gui/components/molecules/Dialog/Dialog.stories.tsx +18 -0
  217. package/src/gui/components/molecules/Dialog/Dialog.tsx +5 -0
  218. package/src/gui/components/molecules/HeroSection/HeroSection.stories.tsx +141 -0
  219. package/src/gui/components/molecules/HeroSection/HeroSection.tsx +152 -0
  220. package/src/gui/components/molecules/HeroSection/HeroSection.types.tsx +18 -0
  221. package/src/gui/components/molecules/ModalBox/ModalBox.resolver.tsx +38 -0
  222. package/src/gui/components/molecules/ModalBox/ModalBox.stories.tsx +82 -0
  223. package/src/gui/components/molecules/ModalBox/ModalBox.tsx +106 -0
  224. package/src/gui/components/molecules/ModalBox/ModalBox.types.ts +29 -0
  225. package/src/gui/components/molecules/Page/Page.stories.tsx +135 -0
  226. package/src/gui/components/molecules/Page/Page.tsx +94 -0
  227. package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.resolver.tsx +58 -0
  228. package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.stories.tsx +133 -0
  229. package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.tsx +101 -0
  230. package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.types.ts +29 -0
  231. package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.resolver.tsx +15 -0
  232. package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.stories.tsx +88 -0
  233. package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.tsx +167 -0
  234. package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.types.ts +34 -0
  235. package/src/gui/components/organism/ChatGPTInterface/ChatGPTInterface.stories.tsx +17 -0
  236. package/src/gui/components/organism/ChatGPTInterface/ChatGPTInterface.tsx +71 -0
  237. package/src/gui/components/organism/RootDomain/RootDomain.stories.tsx +31 -0
  238. package/src/gui/components/organism/RootDomain/RootDomain.tsx +100 -0
  239. package/src/gui/components/organism/RootDomain/staticServices.ts +66 -0
  240. package/src/gui/components/window/Nodes/node.ts +0 -0
  241. package/src/gui/components/window/code/block/node.tsx +0 -0
  242. package/src/gui/components/window/code/hugging.face.api.ts +11 -0
  243. package/src/gui/components/window/connectors/index.ts +19 -0
  244. package/src/gui/components/window/window.stories.tsx +20 -0
  245. package/src/gui/components/window/window.tsx +633 -0
  246. package/src/gui/contexts/InsetsContext.tsx +38 -0
  247. package/src/gui/contexts/LeftSidebarContext.tsx +20 -0
  248. package/src/gui/contexts/RightSidebarContext.tsx +25 -0
  249. package/src/gui/contexts/ThemeContext.ts +34 -0
  250. package/src/gui/contexts/index.ts +4 -0
  251. package/src/gui/hooks/index.ts +11 -0
  252. package/src/gui/hooks/resolveColorToken.ts +39 -0
  253. package/src/gui/hooks/useCodeGen.ts +12 -0
  254. package/src/gui/hooks/useGuiMediaQuery.ts +18 -0
  255. package/src/gui/hooks/useGuiTheme.ts +18 -0
  256. package/src/gui/hooks/useInsets.ts +26 -0
  257. package/src/gui/hooks/useIsMobile.ts +13 -0
  258. package/src/gui/hooks/useIsTouchDevice.ts +25 -0
  259. package/src/gui/hooks/useLeftSidebar.ts +10 -0
  260. package/src/gui/hooks/useRightSidebar.ts +12 -0
  261. package/src/gui/hooks/useViewportKey.ts +19 -0
  262. package/src/gui/hooks/useViewportProp.ts +17 -0
  263. package/src/gui/me/Logic.tsx +31 -0
  264. package/src/gui/me/Me.stories.tsx +8 -0
  265. package/src/gui/me/Me.tsx +197 -0
  266. package/src/gui/me/fundamentals/verbs/verbs.tsx +94 -0
  267. package/src/gui/me/modificators/Adjectives.ts +0 -0
  268. package/src/gui/me/modificators/Adverbs.ts +0 -0
  269. package/src/gui/me/modificators/Complements.ts +27 -0
  270. package/src/gui/me/utils/Context.tsx +14 -0
  271. package/src/gui/me/utils/hooks/useMe.js +37 -0
  272. package/src/gui/utils/nodeID.ts +11 -0
  273. package/src/registry/GuiRegistry.ts +19 -0
  274. package/src/registry/factory.ts +12 -0
  275. package/src/registry/index.ts +3 -0
  276. package/src/registry/types.ts +6 -0
  277. package/src/stories/01.Home.mdx +22 -0
  278. package/src/stories/02.Understanding.This.GUI.mdx +149 -0
  279. package/src/stories/Theme/Palette.stories.tsx +86 -0
  280. package/src/stories/Theme/ThemeViewer.stories.tsx +91 -0
  281. package/src/stories/Theme/Typography.stories.jsx +211 -0
  282. package/src/types/gui.d.ts +67 -0
  283. package/src/types/theme.d.ts +191 -0
  284. package/src/types/viewport.ts +132 -0
@@ -0,0 +1,142 @@
1
+ import * as React from 'react';
2
+ import Tooltip from './Tooltip';
3
+ import type { SxProps, Theme } from '@mui/material/styles';
4
+ import { ensureNodeId } from '@/gui/utils/nodeID';
5
+ import type { RegistryEntry, ResolveCtx } from '@/registry/types';
6
+
7
+ /**
8
+ * Tooltip — Resolver
9
+ * --------------------------------------------------
10
+ * Declarative spec → live <Tooltip /> with correct props.
11
+ * Supports nested declarative children via ctx.render when available.
12
+ */
13
+ export type TooltipSpec = {
14
+ type: 'Tooltip';
15
+ props?: {
16
+ // Content
17
+ title?: React.ReactNode | string; // required by MUI; we default if missing
18
+ children?: React.ReactNode | any; // can be a nested spec object
19
+
20
+ // Behavior
21
+ placement?:
22
+ | 'bottom-end' | 'bottom-start' | 'bottom'
23
+ | 'left-end' | 'left-start' | 'left'
24
+ | 'right-end' | 'right-start' | 'right'
25
+ | 'top-end' | 'top-start' | 'top';
26
+ arrow?: boolean;
27
+ followCursor?: boolean;
28
+ enterDelay?: number;
29
+ enterNextDelay?: number;
30
+ enterTouchDelay?: number;
31
+ leaveDelay?: number;
32
+ leaveTouchDelay?: number;
33
+ disableFocusListener?: boolean;
34
+ disableHoverListener?: boolean;
35
+ disableInteractive?: boolean;
36
+ disableTouchListener?: boolean;
37
+ open?: boolean; // controlled mode
38
+
39
+ // Styling / test ids
40
+ sx?: SxProps<Theme>;
41
+ id?: string;
42
+ className?: string;
43
+ 'data-testid'?: string;
44
+ 'data-gui-id'?: string;
45
+ };
46
+ };
47
+
48
+ const TooltipResolver: RegistryEntry = {
49
+ type: 'Tooltip',
50
+ resolve(spec: TooltipSpec, ctx?: ResolveCtx) {
51
+ const p = spec.props ?? {};
52
+ const guiId = ensureNodeId('Tooltip', (p as any)['data-gui-id']);
53
+
54
+ // Resolve child: if a nested spec is provided and we have a renderer in ctx, use it.
55
+ let childCandidate: any = (spec.props?.children ?? (spec.props as any)?.child) as any;
56
+ if (!React.isValidElement(childCandidate) && childCandidate && typeof childCandidate === 'object' && ctx?.render) {
57
+ childCandidate = ctx.render(childCandidate);
58
+ }
59
+
60
+ // Tooltip expects exactly ONE ReactElement child. Coerce anything else into an element.
61
+ let childEl: React.ReactElement;
62
+ if (React.isValidElement(childCandidate)) {
63
+ childEl = childCandidate as React.ReactElement;
64
+ } else if (
65
+ typeof childCandidate === 'string' ||
66
+ typeof childCandidate === 'number' ||
67
+ typeof childCandidate === 'bigint'
68
+ ) {
69
+ childEl = <span>{String(childCandidate)}</span>;
70
+ } else if (childCandidate) {
71
+ // Arrays, iterables, true/false, portals, promises, etc. → wrap safely
72
+ childEl = <span>{childCandidate as any}</span>;
73
+ } else {
74
+ // No child provided → harmless inline element to satisfy MUI contract
75
+ childEl = <span style={{ display: 'inline-block', width: 0, height: 0 }} />;
76
+ }
77
+
78
+ let titleNode: React.ReactNode = p.title;
79
+ if (titleNode && !React.isValidElement(titleNode) && typeof titleNode === 'object' && ctx?.render) {
80
+ titleNode = ctx.render(titleNode as any);
81
+ }
82
+ if (typeof titleNode === 'undefined' || titleNode === null) {
83
+ titleNode = '';
84
+ }
85
+
86
+ const {
87
+ // remove resolver-only keys
88
+ id,
89
+ className,
90
+ sx,
91
+ placement,
92
+ arrow,
93
+ followCursor,
94
+ enterDelay,
95
+ enterNextDelay,
96
+ enterTouchDelay,
97
+ leaveDelay,
98
+ leaveTouchDelay,
99
+ disableFocusListener,
100
+ disableHoverListener,
101
+ disableInteractive,
102
+ disableTouchListener,
103
+ open,
104
+ // keep title out, we already computed titleNode
105
+ title: _title,
106
+ // also remove our custom id
107
+ ['data-gui-id']: _dataGuiId,
108
+ // and remove the alias 'child' if present
109
+ child: _child,
110
+ ...rest
111
+ } = p as any;
112
+
113
+ return (
114
+ <Tooltip
115
+ title={titleNode}
116
+ placement={placement}
117
+ arrow={arrow}
118
+ followCursor={followCursor}
119
+ enterDelay={enterDelay}
120
+ enterNextDelay={enterNextDelay}
121
+ enterTouchDelay={enterTouchDelay}
122
+ leaveDelay={leaveDelay}
123
+ leaveTouchDelay={leaveTouchDelay}
124
+ disableFocusListener={disableFocusListener}
125
+ disableHoverListener={disableHoverListener}
126
+ disableInteractive={disableInteractive}
127
+ disableTouchListener={disableTouchListener}
128
+ open={open}
129
+ sx={sx}
130
+ id={id}
131
+ className={className}
132
+ data-testid={(p as any)['data-testid']}
133
+ data-gui-id={guiId}
134
+ {...rest}
135
+ >
136
+ {childEl}
137
+ </Tooltip>
138
+ );
139
+ },
140
+ };
141
+
142
+ export default TooltipResolver;
@@ -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/components/atoms/Link/Link';
5
+ import type { RegistryEntry } from '@/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;