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,38 @@
1
+ /**
2
+ * codegen.api.ts
3
+ * -----------------
4
+ * API helper for generating code via OpenAI or local this.env endpoint.
5
+ * Centralizes all network logic for the ChatGPTInterface.
6
+ */
7
+
8
+ export interface CodeGenRequest {
9
+ type: string;
10
+ prompt: string;
11
+ }
12
+
13
+ export interface CodeGenResponse {
14
+ output: string;
15
+ }
16
+
17
+ export async function generateCode(
18
+ { type, prompt }: CodeGenRequest,
19
+ endpoint: string = "/api/codegen"
20
+ ): Promise<CodeGenResponse> {
21
+ try {
22
+ const response = await fetch(endpoint, {
23
+ method: "POST",
24
+ headers: { "Content-Type": "application/json" },
25
+ body: JSON.stringify({ type, prompt }),
26
+ });
27
+
28
+ if (!response.ok) {
29
+ throw new Error(`Failed to generate code: ${response.statusText}`);
30
+ }
31
+
32
+ const data = await response.json();
33
+ return { output: data.output || "No output received." };
34
+ } catch (error: any) {
35
+ console.error("[CodeGen API] Error:", error);
36
+ return { output: `Error: ${error.message || "Unknown error."}` };
37
+ }
38
+ }
@@ -0,0 +1,41 @@
1
+ import * as React from 'react';
2
+ import type { SxProps, Theme } from '@mui/material/styles';
3
+ import AppBar from './AppBar';
4
+ import type { RegistryEntry } from '@/registry/types';
5
+ import { ensureNodeId } from '@/gui/utils/nodeID';
6
+ import type { AppBarResolverSpec as AppBarSpec } from './AppBar.types';
7
+
8
+ /**
9
+ * AppBarResolver
10
+ * - Maps a JSON-friendly spec to <AppBar /> props.
11
+ * - Keeps MUI polymorphism intact (`component` passthrough).
12
+ * - Allows `sx`, ids and className for styling & targeting.
13
+ */
14
+ const AppBarResolver: RegistryEntry = {
15
+ type: 'AppBar',
16
+ resolve(spec: AppBarSpec) {
17
+ const p = spec.props ?? {};
18
+ const rootProps: any = {
19
+ position: p.position ?? 'fixed',
20
+ color: p.color ?? 'default',
21
+ elevation: p.elevation,
22
+ enableColorOnDark: p.enableColorOnDark,
23
+ sx: p.sx,
24
+ id: ensureNodeId('appbar', p.id),
25
+ className: p.className,
26
+ 'data-testid': p['data-testid'],
27
+ };
28
+
29
+ if (p.component) {
30
+ rootProps.component = p.component;
31
+ }
32
+
33
+ return (
34
+ <AppBar {...rootProps}>
35
+ {p.children}
36
+ </AppBar>
37
+ );
38
+ },
39
+ };
40
+
41
+ export default AppBarResolver;
@@ -0,0 +1,225 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { AppBar, Toolbar, Typography, Box, Button } from '@/gui/components/atoms';
3
+
4
+ // ======================= Meta =======================
5
+ const meta: Meta<typeof AppBar> = {
6
+ title: 'Atoms/Containers/AppBar',
7
+ component: AppBar,
8
+ tags: ['autodocs'],
9
+ decorators: [
10
+ (Story) => (
11
+ <div style={{ padding: 0, minHeight: 240 }}>
12
+ <Story />
13
+ </div>
14
+ ),
15
+ ],
16
+ parameters: {
17
+ docs: {
18
+ description: {
19
+ component: `
20
+ The **AppBar** atom is a thin wrapper around MUI's \`AppBar\` that keeps the original API while letting you style it with \`sx\` and use it declaratively through the **resolver**.
21
+
22
+ ---
23
+ ## Features
24
+ - Positions: \`fixed\`, \`absolute\`, \`sticky\`, \`static\`, \`relative\`.
25
+ - Colors: \`default\`, \`inherit\`, \`primary\`, \`secondary\`, \`transparent\`. AppBar **only supports** these colors for the \`color\` prop.
26
+ - Note: \`success\`, \`info\`, \`warning\`, and \`error\` are **not supported** by the \`color\` prop. Use \`sx={{ bgcolor: '...' }}\` for these colors.
27
+ - Additional theme colors can be applied via \`sx={{ bgcolor: 'success.main' }}\` etc.
28
+ - Elevation & dark-mode override with \`enableColorOnDark\`.
29
+ - Accepts any children (e.g., \`<Toolbar/>\`, actions, brand, etc.).
30
+ - Fully themeable via **This.GUI** tokens and \`sx\`.
31
+
32
+ ---
33
+ ## Key Props
34
+ - \`position?: 'fixed' | 'absolute' | 'sticky' | 'static' | 'relative'\`.
35
+ - \`color?: 'default' | 'inherit' | 'primary' | 'secondary' | 'transparent'\` — AppBar **only supports** these values.
36
+ - \`success\`, \`info\`, \`warning\`, and \`error\` are **not supported** by \`color\`; use \`sx={{ bgcolor: '...' }}\` instead.
37
+ - \`elevation?: number\`.
38
+ - \`enableColorOnDark?: boolean\`.
39
+ - \`sx?: object\` — granular styling via the system.
40
+
41
+ ---
42
+ ## Basic usage (React)
43
+ ~~~tsx
44
+ import { AppBar, Toolbar, Typography, Button, Box } from '@/gui/atoms';
45
+
46
+ <AppBar position="fixed" color="default" sx={{ borderBottom: '1px solid', borderColor: 'divider' }}>
47
+ <Toolbar variant="dense">
48
+ <Typography variant="h6" sx={{ flexGrow: 1 }}>My App</Typography>
49
+ <Button variant="text">Login</Button>
50
+ </Toolbar>
51
+ </AppBar>
52
+ ~~~
53
+
54
+ ---
55
+ ## Declarative JSON / Config usage
56
+ This GUI's **resolver** lets you describe an app bar via a config object. Example payload for the \`AppBarResolver\`:
57
+
58
+ ~~~json
59
+ {
60
+ "type": "AppBar",
61
+ "props": {
62
+ "position": "fixed",
63
+ "color": "default",
64
+ "sx": { "borderBottom": "1px solid", "borderColor": "divider" },
65
+ "children": {
66
+ "type": "Toolbar",
67
+ "props": {
68
+ "variant": "dense",
69
+ "children": [
70
+ { "type": "Typography", "props": { "variant": "h6", "sx": { "flexGrow": 1 }, "children": "My App" } },
71
+ { "type": "Button", "props": { "variant": "text", "children": "Login" } }
72
+ ]
73
+ }
74
+ }
75
+ }
76
+ }
77
+ ~~~
78
+
79
+ > The resolver maps this spec to real React elements, preserving polymorphism and \`sx\` styling.
80
+ `,
81
+ },
82
+ },
83
+ },
84
+ argTypes: {
85
+ position: {
86
+ control: { type: 'select' },
87
+ options: ['fixed', 'absolute', 'sticky', 'static', 'relative'],
88
+ },
89
+ color: {
90
+ control: { type: 'select' },
91
+ options: ['default', 'inherit', 'primary', 'secondary', 'transparent'],
92
+ },
93
+ elevation: { control: { type: 'number' } },
94
+ enableColorOnDark: { control: { type: 'boolean' } },
95
+ // component polymorphism is supported but not exposed as a control in SB
96
+ component: { table: { disable: true } },
97
+ },
98
+ args: {
99
+ position: 'fixed',
100
+ elevation: 0,
101
+ enableColorOnDark: false,
102
+ sx: { borderBottom: '1px solid', borderColor: 'divider' },
103
+ },
104
+ };
105
+ export default meta;
106
+
107
+ type Story = StoryObj<typeof AppBar>;
108
+
109
+ // ======================= Stories =======================
110
+ export const Playground: Story = {
111
+ render: (args) => (
112
+ <AppBar {...args}>
113
+ <Toolbar variant="dense">
114
+ <Typography variant="h6" sx={{ flexGrow: 1 }}>Playground</Typography>
115
+ <Button variant="text">Action</Button>
116
+ </Toolbar>
117
+ </AppBar>
118
+ ),
119
+ };
120
+
121
+ export const Positions: Story = {
122
+ render: (args) => (
123
+ <div style={{ display: 'grid', gap: 16 }}>
124
+ {(['fixed', 'absolute', 'sticky', 'static', 'relative'] as const).map((pos) => (
125
+ <AppBar key={pos} {...args} position={pos}>
126
+ <Toolbar variant="dense">
127
+ <Typography variant="subtitle1" sx={{ flexGrow: 1 }}>
128
+ position = {pos}
129
+ </Typography>
130
+ <Button variant="text">Action</Button>
131
+ </Toolbar>
132
+ </AppBar>
133
+ ))}
134
+ </div>
135
+ ),
136
+ };
137
+
138
+ export const Colors: Story = {
139
+ parameters: {
140
+ docs: {
141
+ description: {
142
+ story: `
143
+ The AppBar component only supports the following values for the \`color\` prop: \`default\`, \`inherit\`, \`primary\`, \`secondary\`, and \`transparent\`.
144
+ For colors like \`success\`, \`info\`, \`warning\`, and \`error\`, use the \`sx\` prop with \`bgcolor\` instead, e.g. \`sx={{ bgcolor: 'success.main' }}\`.
145
+ `,
146
+ },
147
+ },
148
+ },
149
+ args: { position: 'static' },
150
+ render: (args) => (
151
+ <div style={{ display: 'grid', gap: 12 }}>
152
+ {(['default', 'inherit', 'primary', 'secondary', 'transparent'] as const).map((c) => (
153
+ <AppBar key={c} {...args} color={c}>
154
+ <Toolbar variant="dense">
155
+ <Typography variant="subtitle2" sx={{ flexGrow: 1 }}>color = {c}</Typography>
156
+ <Button variant="text">Action</Button>
157
+ </Toolbar>
158
+ </AppBar>
159
+ ))}
160
+ </div>
161
+ ),
162
+ };
163
+
164
+ /**
165
+ * The AppBar component does not support 'success', 'info', 'warning', or 'error' as values for the color prop.
166
+ * To use these colors, apply them via the sx prop with bgcolor instead.
167
+ */
168
+ export const CustomColorsWithSx: Story = {
169
+ args: { position: 'static' },
170
+ render: (args) => (
171
+ <div style={{ display: 'grid', gap: 12 }}>
172
+ {(['success.main', 'info.main', 'warning.main', 'error.main'] as const).map((bgcolor) => (
173
+ <AppBar key={bgcolor} {...args} sx={{ bgcolor }}>
174
+ <Toolbar variant="dense">
175
+ <Typography variant="subtitle2" sx={{ flexGrow: 1 }}>{`sx.bgcolor = ${bgcolor}`}</Typography>
176
+ <Button variant="text">Action</Button>
177
+ </Toolbar>
178
+ </AppBar>
179
+ ))}
180
+ </div>
181
+ ),
182
+ };
183
+
184
+ export const WithToolbar: Story = {
185
+ args: { position: 'static', color: 'default' },
186
+ render: (args) => (
187
+ <AppBar {...args} sx={{ px: 2, borderBottom: '1px solid', borderColor: 'divider' }}>
188
+ <Toolbar variant="dense">
189
+ <Typography variant="h6" sx={{ flexGrow: 1 }}>With Toolbar</Typography>
190
+ <Box sx={{ display: 'flex', gap: 1 }}>
191
+ <Button variant="text">Login</Button>
192
+ <Button variant="contained" color="primary">Sign up</Button>
193
+ </Box>
194
+ </Toolbar>
195
+ </AppBar>
196
+ ),
197
+ };
198
+
199
+ export const Elevation: Story = {
200
+ args: { position: 'static', color: 'default' },
201
+ render: (args) => (
202
+ <div style={{ display: 'grid', gap: 12 }}>
203
+ {[0, 1, 2, 4, 8].map((elev) => (
204
+ <AppBar key={elev} {...args} elevation={elev}>
205
+ <Toolbar variant="dense">
206
+ <Typography variant="subtitle2" sx={{ flexGrow: 1 }}>elevation = {elev}</Typography>
207
+ <Button variant="text">Action</Button>
208
+ </Toolbar>
209
+ </AppBar>
210
+ ))}
211
+ </div>
212
+ ),
213
+ };
214
+
215
+ export const EnableColorOnDark: Story = {
216
+ args: { position: 'static', color: 'primary', enableColorOnDark: true },
217
+ render: (args) => (
218
+ <AppBar {...args}>
219
+ <Toolbar variant="dense">
220
+ <Typography variant="subtitle2" sx={{ flexGrow: 1 }}>enableColorOnDark = true</Typography>
221
+ <Button variant="text">Action</Button>
222
+ </Toolbar>
223
+ </AppBar>
224
+ ),
225
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import MuiAppBar from '@mui/material/AppBar';
3
+ import type { AppBarProps } from './AppBar.types.ts';
4
+ const AppBar = React.forwardRef<HTMLDivElement, AppBarProps>((props, ref) => {
5
+ return <MuiAppBar ref={ref} {...props} />;
6
+ });
7
+ AppBar.displayName = 'AppBar';
8
+ export default AppBar;
@@ -0,0 +1,28 @@
1
+ import type { AppBarProps as MuiAppBarProps } from '@mui/material/AppBar';
2
+
3
+ /**
4
+ * AppBarProps
5
+ * -----------
6
+ * Extends MUI's AppBarProps to add This.GUI-specific fields (id, data-testid).
7
+ */
8
+ export interface AppBarProps extends MuiAppBarProps {
9
+ /** Optional id for targeting/testing */
10
+ id?: string;
11
+ /** Optional data-testid for testing */
12
+ ['data-testid']?: string;
13
+ }
14
+
15
+ /**
16
+ * AppBarResolverSpec
17
+ * ------------------
18
+ * JSON-friendly spec for declarative usage.
19
+ */
20
+ export type AppBarResolverSpec = {
21
+ type?: 'AppBar';
22
+ props?: Partial<AppBarProps> & {
23
+ /** Optional polymorphic component (Link, 'a', etc.) */
24
+ component?: React.ElementType;
25
+ /** Children to render inside the AppBar */
26
+ children?: React.ReactNode;
27
+ };
28
+ };
@@ -0,0 +1,61 @@
1
+ import * as React from 'react';
2
+ import type { RegistryEntry, ResolveCtx } from '@/registry/types';
3
+ import type { SxProps, Theme } from '@mui/material/styles';
4
+ import { ensureNodeId } from '@/gui/utils/nodeID';
5
+ import Avatar from './Avatar';
6
+ export type AvatarSpec = {
7
+ type: 'Avatar';
8
+ props?: {
9
+ children?: React.ReactNode;
10
+ alt?: string;
11
+ src?: string;
12
+ variant?: 'circular' | 'rounded' | 'square';
13
+ sx?: SxProps<Theme>;
14
+ className?: string;
15
+ id?: string;
16
+ 'data-testid'?: string;
17
+ component?: React.ElementType;
18
+ as?: React.ElementType;
19
+ [key: string]: any;
20
+ };
21
+ };
22
+
23
+ const AvatarResolver: RegistryEntry = {
24
+ type: 'Avatar',
25
+ resolve(spec: AvatarSpec, _ctx?: ResolveCtx) {
26
+ const p = spec.props ?? {};
27
+ const {
28
+ children,
29
+ alt,
30
+ src,
31
+ variant,
32
+ sx,
33
+ className,
34
+ id,
35
+ component,
36
+ as,
37
+ ...rest
38
+ } = p;
39
+
40
+ const resolvedComponent = component ?? as;
41
+ const avatarId = ensureNodeId('avatar', id);
42
+
43
+ return (
44
+ <Avatar
45
+ src={src}
46
+ alt={alt}
47
+ variant={variant}
48
+ sx={sx}
49
+ className={className}
50
+ id={avatarId}
51
+ data-testid={p['data-testid']}
52
+ {...(resolvedComponent ? { component: resolvedComponent } : {})}
53
+ {...rest}
54
+ >
55
+ {children}
56
+ </Avatar>
57
+ );
58
+ },
59
+ };
60
+
61
+ export default AvatarResolver;
@@ -0,0 +1,36 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Avatar from './Avatar';
3
+
4
+ const meta: Meta<typeof Avatar> = {
5
+ title: 'Atoms/Avatar',
6
+ component: Avatar,
7
+ tags: ['autodocs'],
8
+ };
9
+
10
+ export default meta;
11
+ type Story = StoryObj<typeof Avatar>;
12
+
13
+ export const InitialsAvatar: Story = {
14
+ render: () => (
15
+ <Avatar>
16
+ AB
17
+ </Avatar>
18
+ ),
19
+ name: 'With Initials',
20
+ };
21
+
22
+ export const ImageAvatar: Story = {
23
+ render: () => (
24
+ <Avatar alt="Abella" src="https://i.pravatar.cc/150?img=32" />
25
+ ),
26
+ name: 'With Image',
27
+ };
28
+
29
+ export const SquareAvatar: Story = {
30
+ render: () => (
31
+ <Avatar variant="square">
32
+ SQ
33
+ </Avatar>
34
+ ),
35
+ name: 'Square Variant',
36
+ };
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import MuiAvatar from '@mui/material/Avatar';
3
+
4
+ /**
5
+ * This.GUI — Avatar (atom)
6
+ * Thin wrapper around MUI’s Avatar component.
7
+ *
8
+ * Supports standard avatar props like `src`, `alt`, `variant`, and `sx`.
9
+ * Enables consistent use of avatar styling across the system.
10
+ */
11
+ const Avatar = MuiAvatar;
12
+ export type AvatarProps = React.ComponentProps<typeof Avatar>;
13
+ (Avatar as any).displayName = 'Gui.Avatar';
14
+ export default Avatar;
@@ -0,0 +1,171 @@
1
+ import * as React from 'react';
2
+ import Box from './Box';
3
+ import Link from '../Link/Link';
4
+ import type { RegistryEntry, ResolveCtx } from '@/registry/types';
5
+ import type { SxProps, Theme } from '@mui/material/styles';
6
+ import { ensureNodeId } from '@/gui/utils/nodeID';
7
+
8
+ /**
9
+ * Declarative spec for Box (polymorphic container)
10
+ *
11
+ * JSON-friendly rules:
12
+ * - Prefer `to` / `href` / `external` over passing a string `"Link"`.
13
+ * - We accept intrinsic element strings (e.g. 'div', 'section', 'span', 'a', 'img').
14
+ * - If `to` is present and no explicit React component was provided, we render with This.GUI `Link`.
15
+ * - If `href`/`external` are present and no explicit component was provided, we render an anchor (`'a'`).
16
+ * - When `component="img"`, image attributes (`src`, `alt`, `width`, `height`, etc.) are passed through.
17
+ */
18
+ export type BoxSpec = {
19
+ type: 'Box';
20
+ props?: {
21
+ children?: React.ReactNode;
22
+
23
+ // Polymorphism / routing
24
+ component?: React.ElementType | string;
25
+ as?: React.ElementType | string; // alias for component
26
+ to?: string; // router target (when component={Link} or inferred)
27
+ href?: string; // anchor target (when component='a' or inferred)
28
+ external?: boolean | 'true' | 1; // if truthy, anchor gets safe target/rel
29
+ target?: React.HTMLAttributeAnchorTarget;
30
+ rel?: string;
31
+
32
+ // IMG-specific (when component='img')
33
+ src?: string;
34
+ alt?: string;
35
+ width?: number | string;
36
+ height?: number | string;
37
+ loading?: 'eager' | 'lazy';
38
+ decoding?: 'auto' | 'sync' | 'async';
39
+ referrerPolicy?: React.HTMLAttributeReferrerPolicy;
40
+ sizes?: string;
41
+ srcSet?: string;
42
+
43
+ // Styling & misc
44
+ sx?: SxProps<Theme>;
45
+ className?: string;
46
+ id?: string;
47
+ 'data-testid'?: string;
48
+
49
+ // Allow system props / arbitrary passthrough (gap, p, m, display, etc.)
50
+ [key: string]: any;
51
+ };
52
+ };
53
+
54
+ const BoxResolver: RegistryEntry = {
55
+ type: 'Box',
56
+ resolve(spec: BoxSpec, _ctx?: ResolveCtx) {
57
+ const p = spec.props ?? {};
58
+
59
+ // Decide polymorphic target (safe for JSON):
60
+ // - Accept real React components (functions/classes).
61
+ // - Accept intrinsic strings ('div','section','span','a','img', etc.) EXCEPT the string "Link".
62
+ // - Infer Link/'a' from `to`/`href` when no explicit component is provided.
63
+ const rawComp = p.component ?? p.as;
64
+
65
+ const isReactComp = typeof rawComp === 'function';
66
+ const isString = typeof rawComp === 'string';
67
+
68
+ // Normalize strings (e.g. 'Img' -> 'img'); disallow the literal "Link"
69
+ const normalizedString = isString ? String(rawComp).trim() : undefined;
70
+ const lowered = normalizedString ? normalizedString.toLowerCase() : undefined;
71
+ const isIntrinsicString = !!normalizedString && lowered !== 'link';
72
+
73
+ let component: any | undefined =
74
+ isReactComp ? (rawComp as React.ElementType) :
75
+ isIntrinsicString ? normalizedString :
76
+ undefined;
77
+
78
+ if (!component) {
79
+ if (p.to) {
80
+ component = Link;
81
+ } else if (p.href || p.external) {
82
+ component = 'a';
83
+ }
84
+ }
85
+
86
+ // Build routing/anchor props only if they match the chosen component
87
+ const routingProps: Record<string, any> = {};
88
+ if (component === Link && p.to) {
89
+ routingProps.to = p.to;
90
+ }
91
+ if (component === 'a') {
92
+ routingProps.href = p.href;
93
+ const isExternal = p.external === true || p.external === 'true' || p.external === 1;
94
+ if (isExternal) {
95
+ routingProps.target = p.target ?? '_blank';
96
+ routingProps.rel = p.rel ?? 'noopener noreferrer';
97
+ } else {
98
+ if (p.target) routingProps.target = p.target;
99
+ if (p.rel) routingProps.rel = p.rel;
100
+ }
101
+ }
102
+
103
+ // IMG specific passthrough (only when explicitly rendering an <img>)
104
+ const imgProps =
105
+ component === 'img'
106
+ ? {
107
+ src: p.src,
108
+ alt: p.alt,
109
+ width: p.width,
110
+ height: p.height,
111
+ loading: p.loading,
112
+ decoding: p.decoding,
113
+ referrerPolicy: p.referrerPolicy,
114
+ sizes: p.sizes,
115
+ srcSet: p.srcSet,
116
+ }
117
+ : {};
118
+
119
+ // Dev-time nudge if someone picked 'img' without a src
120
+ if (process.env.NODE_ENV !== 'production' && component === 'img' && !p.src) {
121
+ // eslint-disable-next-line no-console
122
+ console.warn('[Box.resolver] component="img" used without a `src` prop.');
123
+ }
124
+
125
+ // Collect common props and avoid leaking resolver-only keys
126
+ const {
127
+ children,
128
+ // resolver-only / routing keys to strip
129
+ as: _as,
130
+ to: _to,
131
+ href: _href,
132
+ external: _external,
133
+ target: _target,
134
+ rel: _rel,
135
+ // img-only keys already handled
136
+ src: _src,
137
+ alt: _alt,
138
+ width: _width,
139
+ height: _height,
140
+ loading: _loading,
141
+ decoding: _decoding,
142
+ referrerPolicy: _referrerPolicy,
143
+ sizes: _sizes,
144
+ srcSet: _srcSet,
145
+ // passthrough everything else (system props, data-*, aria-*, etc.)
146
+ ...rest
147
+ } = p;
148
+
149
+ // Build root props, conditionally attach `component`
150
+ const rootProps: Record<string, any> = {
151
+ sx: p.sx,
152
+ id: ensureNodeId('box', p.id),
153
+ className: p.className,
154
+ 'data-testid': p['data-testid'],
155
+ ...routingProps,
156
+ ...imgProps,
157
+ ...rest,
158
+ };
159
+ if (component) {
160
+ rootProps.component = component;
161
+ }
162
+
163
+ return (
164
+ <Box {...rootProps}>
165
+ {children}
166
+ </Box>
167
+ );
168
+ },
169
+ };
170
+
171
+ export default BoxResolver;