this.gui 1.3.41 → 1.3.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -2
- package/src/GUI.tsx +46 -0
- package/src/QRouter/QRegistry.tsx +53 -0
- package/src/QRouter/QRouter.stories.tsx +31 -0
- package/src/QRouter/QRouter.tsx +57 -0
- package/src/gui/Theme/GuiProvider.tsx +111 -0
- package/src/gui/Theme/Icon/Icon.resolver.tsx +29 -0
- package/src/gui/Theme/Icon/Icon.tsx +43 -0
- package/src/gui/Theme/Layout/Content/Content.resolver.tsx +0 -0
- package/src/gui/Theme/Layout/Content/Content.stories.tsx +88 -0
- package/src/gui/Theme/Layout/Content/Content.tsx +53 -0
- package/src/gui/Theme/Layout/Content/Content.types.tsx +40 -0
- package/src/gui/Theme/Layout/Footer/Footer.resolver.tsx +45 -0
- package/src/gui/Theme/Layout/Footer/Footer.stories.tsx +205 -0
- package/src/gui/Theme/Layout/Footer/Footer.tsx +337 -0
- package/src/gui/Theme/Layout/Footer/Footer.types.ts +40 -0
- package/src/gui/Theme/Layout/Layout/Layout.resolver.tsx +37 -0
- package/src/gui/Theme/Layout/Layout/Layout.stories.tsx +289 -0
- package/src/gui/Theme/Layout/Layout/Layout.tsx +117 -0
- package/src/gui/Theme/Layout/Layout/Layout.types.ts +57 -0
- package/src/gui/Theme/Layout/Layout/useLayoutBreakpoints.ts +9 -0
- package/src/gui/Theme/Layout/Namespace/Namespace.stories.tsx +105 -0
- package/src/gui/Theme/Layout/Namespace/Namespace.tsx +26 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.resolver.tsx +87 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.stories.tsx +199 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.tsx +311 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.types.ts +41 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/SidebarToggleButton.tsx +53 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.resolver.tsx +19 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.tsx +107 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.resolver.tsx +0 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.tsx +134 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.types.ts +15 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarMenu/LeftSidebarMenu.tsx +142 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarToggleButton/LeftSidebarToggleButton.tsx +23 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.resolver.tsx +35 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.stories.tsx +239 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.tsx +319 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.types.ts +17 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarAction/RightSidebarAction.tsx +102 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarLink/RightSidebarLink.tsx +132 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarMenu/RightSidebarMenu.tsx +140 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarToggleButton/RightSidebarToggleButton.tsx +22 -0
- package/src/gui/Theme/Layout/StickyOptions/StickyOptionsTop.stories.tsx +469 -0
- package/src/gui/Theme/Layout/StickyOptions/StickyOptionsTop.tsx +489 -0
- package/src/gui/Theme/Layout/TopBar/TopBar.resolver.tsx +86 -0
- package/src/gui/Theme/Layout/TopBar/TopBar.stories.tsx +350 -0
- package/src/gui/Theme/Layout/TopBar/TopBar.tsx +292 -0
- package/src/gui/Theme/Layout/TopBar/TopBar.types.ts +39 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.stories.tsx +83 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.tsx +18 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.types.ts +4 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.stories.tsx +189 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.tsx +30 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.types.ts +9 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.resolver.tsx +14 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.stories.tsx +56 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.tsx +123 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.types.ts +44 -0
- package/src/gui/Theme/catalog/CherryByte/CherryByte.png +0 -0
- package/src/gui/Theme/catalog/CherryByte/dark.tokens.ts +47 -0
- package/src/gui/Theme/catalog/CherryByte/light.tokens.ts +47 -0
- package/src/gui/Theme/catalog/CherryByte/manifest.ts +24 -0
- package/src/gui/Theme/catalog/GhostShell/dark.tokens.ts +43 -0
- package/src/gui/Theme/catalog/GhostShell/ghost.png +0 -0
- package/src/gui/Theme/catalog/GhostShell/light.tokens.ts +39 -0
- package/src/gui/Theme/catalog/GhostShell/manifest.ts +24 -0
- package/src/gui/Theme/catalog/LunaHex/LunaHex.png +0 -0
- package/src/gui/Theme/catalog/LunaHex/dark.tokens.ts +34 -0
- package/src/gui/Theme/catalog/LunaHex/light.tokens.ts +74 -0
- package/src/gui/Theme/catalog/LunaHex/manifest.ts +24 -0
- package/src/gui/Theme/catalog/MUI/MUI.png +0 -0
- package/src/gui/Theme/catalog/MUI/dark.tokens.ts +58 -0
- package/src/gui/Theme/catalog/MUI/light.tokens.ts +74 -0
- package/src/gui/Theme/catalog/MUI/manifest.ts +24 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/dark.tokens.ts +48 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/light.tokens.ts +47 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/manifest.ts +24 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/prince.png +0 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/princeOfDarkness.png +0 -0
- package/src/gui/Theme/catalog/Seafoam/dark.tokens.ts +49 -0
- package/src/gui/Theme/catalog/Seafoam/light.tokens.ts +47 -0
- package/src/gui/Theme/catalog/Seafoam/manifest.ts +24 -0
- package/src/gui/Theme/catalog/Seafoam/seaFoam.png +0 -0
- package/src/gui/Theme/catalog/neurons/dark.tokens.ts +58 -0
- package/src/gui/Theme/catalog/neurons/light.tokens.ts +74 -0
- package/src/gui/Theme/catalog/neurons/manifest.ts +24 -0
- package/src/gui/Theme/catalog/neurons/neurons.me.png +0 -0
- package/src/gui/Theme/fromTokens.ts +272 -0
- package/src/gui/Theme/gui.css +31 -0
- package/src/gui/Theme/index.ts +17 -0
- package/src/gui/Theme/styles/buildShadows.ts +83 -0
- package/src/gui/Theme/styles/theme.tokens.ts +108 -0
- package/src/gui/Theme/utils/catalog.ts +61 -0
- package/src/gui/Theme/utils/persistence.ts +66 -0
- package/src/gui/Theme/utils/themeUtils.ts +34 -0
- package/src/gui/components/atoms/AppBar/AppBar.resolver.tsx +46 -0
- package/src/gui/components/atoms/AppBar/AppBar.stories.tsx +251 -0
- package/src/gui/components/atoms/AppBar/AppBar.tsx +107 -0
- package/src/gui/components/atoms/AppBar/AppBar.types.ts +28 -0
- package/src/gui/components/atoms/Avatar/Avatar.resolver.tsx +61 -0
- package/src/gui/components/atoms/Avatar/Avatar.stories.tsx +36 -0
- package/src/gui/components/atoms/Avatar/Avatar.tsx +14 -0
- package/src/gui/components/atoms/Box/Box.resolver.tsx +171 -0
- package/src/gui/components/atoms/Box/Box.stories.tsx +263 -0
- package/src/gui/components/atoms/Box/Box.tsx +15 -0
- package/src/gui/components/atoms/Button/Button.resolver.tsx +103 -0
- package/src/gui/components/atoms/Button/Button.stories.tsx +219 -0
- package/src/gui/components/atoms/Button/Button.tsx +40 -0
- package/src/gui/components/atoms/Card/Card.resolver.tsx +63 -0
- package/src/gui/components/atoms/Card/Card.stories.tsx +54 -0
- package/src/gui/components/atoms/Card/Card.tsx +13 -0
- package/src/gui/components/atoms/CardActions/CardActions.resolver.tsx +59 -0
- package/src/gui/components/atoms/CardActions/CardActions.stories.tsx +32 -0
- package/src/gui/components/atoms/CardActions/CardActions.tsx +14 -0
- package/src/gui/components/atoms/CardContent/CardContent.resolver.tsx +60 -0
- package/src/gui/components/atoms/CardContent/CardContent.stories.tsx +34 -0
- package/src/gui/components/atoms/CardContent/CardContent.tsx +13 -0
- package/src/gui/components/atoms/CardHeader/CardHeader.resolver.tsx +68 -0
- package/src/gui/components/atoms/CardHeader/CardHeader.stories.tsx +40 -0
- package/src/gui/components/atoms/CardHeader/CardHeader.tsx +12 -0
- package/src/gui/components/atoms/Collapse/Collapse.resolver.tsx +85 -0
- package/src/gui/components/atoms/Collapse/Collapse.stories.tsx +130 -0
- package/src/gui/components/atoms/Collapse/Collapse.tsx +17 -0
- package/src/gui/components/atoms/Divider/Divider.resolver.tsx +95 -0
- package/src/gui/components/atoms/Divider/Divider.stories.tsx +108 -0
- package/src/gui/components/atoms/Divider/Divider.tsx +14 -0
- package/src/gui/components/atoms/Drawer/Drawer.resolver.tsx +116 -0
- package/src/gui/components/atoms/Drawer/Drawer.stories.tsx +223 -0
- package/src/gui/components/atoms/Drawer/Drawer.tsx +25 -0
- package/src/gui/components/atoms/Grid/Grid.resolver.tsx +33 -0
- package/src/gui/components/atoms/Grid/Grid.stories.tsx +136 -0
- package/src/gui/components/atoms/Grid/Grid.tsx +15 -0
- package/src/gui/components/atoms/Grid/Grid.types.ts +9 -0
- package/src/gui/components/atoms/IconButton/IconButton.resolver.tsx +137 -0
- package/src/gui/components/atoms/IconButton/IconButton.stories.tsx +134 -0
- package/src/gui/components/atoms/IconButton/IconButton.tsx +22 -0
- package/src/gui/components/atoms/Link/Link.resolver.tsx +74 -0
- package/src/gui/components/atoms/Link/Link.stories.tsx +157 -0
- package/src/gui/components/atoms/Link/Link.tsx +36 -0
- package/src/gui/components/atoms/List/List.resolver.tsx +94 -0
- package/src/gui/components/atoms/List/List.stories.tsx +137 -0
- package/src/gui/components/atoms/List/List.tsx +20 -0
- package/src/gui/components/atoms/ListItem/ListItem.resolver.tsx +88 -0
- package/src/gui/components/atoms/ListItem/ListItem.stories.tsx +151 -0
- package/src/gui/components/atoms/ListItem/ListItem.tsx +19 -0
- package/src/gui/components/atoms/ListItemButton/ListItemButton.resolver.tsx +214 -0
- package/src/gui/components/atoms/ListItemButton/ListItemButton.stories.tsx +155 -0
- package/src/gui/components/atoms/ListItemButton/ListItemButton.tsx +15 -0
- package/src/gui/components/atoms/ListItemIcon/ListItemIcon.resolver.tsx +102 -0
- package/src/gui/components/atoms/ListItemIcon/ListItemIcon.stories.tsx +132 -0
- package/src/gui/components/atoms/ListItemIcon/ListItemIcon.tsx +11 -0
- package/src/gui/components/atoms/ListItemText/ListItemText.resolver.tsx +112 -0
- package/src/gui/components/atoms/ListItemText/ListItemText.stories.tsx +156 -0
- package/src/gui/components/atoms/ListItemText/ListItemText.tsx +15 -0
- package/src/gui/components/atoms/Menu/Menu.resolver.tsx +112 -0
- package/src/gui/components/atoms/Menu/Menu.stories.tsx +162 -0
- package/src/gui/components/atoms/Menu/Menu.tsx +17 -0
- package/src/gui/components/atoms/MenuItem/MenuItem.resolver.tsx +183 -0
- package/src/gui/components/atoms/MenuItem/MenuItem.stories.tsx +134 -0
- package/src/gui/components/atoms/MenuItem/MenuItem.tsx +14 -0
- package/src/gui/components/atoms/Paper/Paper.resolver.tsx +98 -0
- package/src/gui/components/atoms/Paper/Paper.stories.tsx +184 -0
- package/src/gui/components/atoms/Paper/Paper.tsx +15 -0
- package/src/gui/components/atoms/Section/Section.resolver.tsx +10 -0
- package/src/gui/components/atoms/Section/Section.stories.tsx +189 -0
- package/src/gui/components/atoms/Section/Section.tsx +76 -0
- package/src/gui/components/atoms/Section/Section.types.tsx +24 -0
- package/src/gui/components/atoms/Stack/Stack.resolver.tsx +94 -0
- package/src/gui/components/atoms/Stack/Stack.stories.tsx +160 -0
- package/src/gui/components/atoms/Stack/Stack.tsx +15 -0
- package/src/gui/components/atoms/Surface/Surface.resolver.tsx +37 -0
- package/src/gui/components/atoms/Surface/Surface.tsx +49 -0
- package/src/gui/components/atoms/Surface/Surface.types.ts +20 -0
- package/src/gui/components/atoms/Switch/Switch.resolver.tsx +53 -0
- package/src/gui/components/atoms/Switch/Switch.stories.tsx +236 -0
- package/src/gui/components/atoms/Switch/Switch.tsx +22 -0
- package/src/gui/components/atoms/Table/Body/TableBody.tsx +7 -0
- package/src/gui/components/atoms/Table/Cell/TableCell.tsx +18 -0
- package/src/gui/components/atoms/Table/Head/TableHead.tsx +9 -0
- package/src/gui/components/atoms/Table/Row/TableRow.tsx +20 -0
- package/src/gui/components/atoms/Table/Table.resolver.tsx +77 -0
- package/src/gui/components/atoms/Table/Table.stories.tsx +173 -0
- package/src/gui/components/atoms/Table/Table.tsx +20 -0
- package/src/gui/components/atoms/TextField/TextField.stories.tsx +25 -0
- package/src/gui/components/atoms/TextField/TextField.tsx +15 -0
- package/src/gui/components/atoms/Toolbar/Toolbar.resolver.tsx +60 -0
- package/src/gui/components/atoms/Toolbar/Toolbar.stories.tsx +155 -0
- package/src/gui/components/atoms/Toolbar/Toolbar.tsx +16 -0
- package/src/gui/components/atoms/Tooltip/Tooltip.resolver.tsx +142 -0
- package/src/gui/components/atoms/Tooltip/Tooltip.stories.tsx +117 -0
- package/src/gui/components/atoms/Tooltip/Tooltip.tsx +70 -0
- package/src/gui/components/atoms/Typography/Typography.resolver.tsx +158 -0
- package/src/gui/components/atoms/Typography/Typography.stories.tsx +222 -0
- package/src/gui/components/atoms/Typography/Typography.tsx +27 -0
- package/src/gui/components/atoms/Window/Nodes/node.ts +0 -0
- package/src/gui/components/atoms/Window/code/block/node.tsx +0 -0
- package/src/gui/components/atoms/Window/code/hugging.face.api.ts +11 -0
- package/src/gui/components/atoms/Window/connectors/index.ts +19 -0
- package/src/gui/components/atoms/Window/window.stories.tsx +20 -0
- package/src/gui/components/atoms/Window/window.tsx +636 -0
- package/src/gui/components/atoms/atoms.tsx +151 -0
- package/src/gui/components/atoms/index.ts +2 -0
- package/src/gui/components/generics/Cards/Gridme.jsx +52 -0
- package/src/gui/components/generics/Cards/LilBox.jsx +65 -0
- package/src/gui/components/generics/Cards/ModuleCard.jsx +106 -0
- package/src/gui/components/generics/Chats/FullChatBot.jsx +223 -0
- package/src/gui/components/generics/Code/CodeBlock.jsx +33 -0
- package/src/gui/components/generics/EmojiCursor/EmojiCursor.stories.tsx +153 -0
- package/src/gui/components/generics/EmojiCursor/EmojiCursor.tsx +23 -0
- package/src/gui/components/generics/Feedback/Callout.jsx +92 -0
- package/src/gui/components/generics/Layout/GridX.jsx +29 -0
- package/src/gui/components/generics/Layout/Hero2.jsx +132 -0
- package/src/gui/components/generics/Layout/PageContainer.jsx +29 -0
- package/src/gui/components/generics/Layout/PageDivider.jsx +20 -0
- package/src/gui/components/generics/Layout/Section.jsx +43 -0
- package/src/gui/components/generics/Layout/SectionHeader.jsx +21 -0
- package/src/gui/components/generics/Media/Img.jsx +58 -0
- package/src/gui/components/generics/Media/VideoEmbed.jsx +51 -0
- package/src/gui/components/generics/Organization/TableOfContents.jsx +51 -0
- package/src/gui/components/generics/Organization/Tabs.jsx +45 -0
- package/src/gui/components/generics/Text/TextList.jsx +41 -0
- package/src/gui/components/generics/Text/TextParagraph.jsx +28 -0
- package/src/gui/components/generics/Text/TextQuote.jsx +23 -0
- package/src/gui/components/generics/Text/TextTitle.jsx +44 -0
- package/src/gui/components/molecules/Dialog/Dialog.stories.tsx +18 -0
- package/src/gui/components/molecules/Dialog/Dialog.tsx +5 -0
- package/src/gui/components/molecules/Hero/Hero.stories.tsx +140 -0
- package/src/gui/components/molecules/Hero/Hero.tsx +152 -0
- package/src/gui/components/molecules/Hero/Hero.types.tsx +18 -0
- package/src/gui/components/molecules/Modal/Modal.resolver.tsx +38 -0
- package/src/gui/components/molecules/Modal/Modal.stories.tsx +82 -0
- package/src/gui/components/molecules/Modal/Modal.tsx +110 -0
- package/src/gui/components/molecules/Modal/Modal.types.ts +29 -0
- package/src/gui/components/molecules/Page/Page.stories.tsx +135 -0
- package/src/gui/components/molecules/Page/Page.tsx +94 -0
- package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.resolver.tsx +58 -0
- package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.stories.tsx +133 -0
- package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.tsx +101 -0
- package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.types.ts +29 -0
- package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.resolver.tsx +15 -0
- package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.stories.tsx +88 -0
- package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.tsx +167 -0
- package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.types.ts +34 -0
- package/src/gui/components/molecules/molecules.ts +49 -0
- package/src/gui/components/organisms/Blockchain/Blocks/BlocksTable.tsx +119 -0
- package/src/gui/components/organisms/Blockchain/Usernames/Identities.stories.tsx +20 -0
- package/src/gui/components/organisms/Blockchain/Usernames/QR.tsx +566 -0
- package/src/gui/components/organisms/Blockchain/Usernames/Usernames.tsx +448 -0
- package/src/gui/components/organisms/Blockchain/Usernames/identities.tsx +710 -0
- package/src/gui/components/organisms/Blockchain/blockchain.stories.tsx +17 -0
- package/src/gui/components/organisms/Blockchain/blockchain.tsx +368 -0
- package/src/gui/components/organisms/Blockchain/scripts/connection.ts +82 -0
- package/src/gui/components/organisms/Blockchain/scripts/match_face.ts +143 -0
- package/src/gui/components/organisms/HighLighter/HighLighter.stories.tsx +168 -0
- package/src/gui/components/organisms/HighLighter/HighLighter.tsx +420 -0
- package/src/gui/components/organisms/HighLighter/HighLightsDrawer.tsx +197 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/FaceRecognition.stories.tsx +312 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/FaceRecognition.tsx +765 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceCameraPermission.ts +70 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceLandmarker.ts +106 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceOverlay.ts +489 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceTemplate.ts +32 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceTemplateBurst.ts +178 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/verifyTemplate.ts +136 -0
- package/src/gui/components/organisms/IdentityNoise/IdentityNoise.tsx +403 -0
- package/src/gui/components/organisms/IdentityNoise/IndentityNoise.stories.tsx +15 -0
- package/src/gui/components/organisms/IdentityNoise/Noise/Noise.stories.tsx +206 -0
- package/src/gui/components/organisms/IdentityNoise/Noise/Noise.tsx +394 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/QR.tsx +566 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/Tiad.stories.tsx +6 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/Triad.tsx +917 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/handleCleak.ts +0 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/identity.ts +31 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/me/fundamentals/vectors/vectors.tsx +252 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/me/me.stories.tsx +314 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/me/me.tsx +0 -0
- package/src/gui/components/organisms/organisms.ts +15 -0
- package/src/gui/contexts/InsetsContext.tsx +40 -0
- package/src/gui/contexts/LeftSidebarContext.tsx +20 -0
- package/src/gui/contexts/RightSidebarContext.tsx +25 -0
- package/src/gui/contexts/ThemeContext.ts +34 -0
- package/src/gui/contexts/index.ts +4 -0
- package/src/gui/hooks/index.ts +11 -0
- package/src/gui/hooks/resolveColorToken.ts +39 -0
- package/src/gui/hooks/useCodeGen.ts +12 -0
- package/src/gui/hooks/useGuiMediaQuery.ts +18 -0
- package/src/gui/hooks/useGuiTheme.ts +18 -0
- package/src/gui/hooks/useInsets.ts +26 -0
- package/src/gui/hooks/useIsMobile.ts +13 -0
- package/src/gui/hooks/useIsTouchDevice.ts +25 -0
- package/src/gui/hooks/useLeftSidebar.ts +10 -0
- package/src/gui/hooks/useRightSidebar.ts +12 -0
- package/src/gui/hooks/useViewportKey.ts +19 -0
- package/src/gui/hooks/useViewportProp.ts +17 -0
- package/src/gui/registry/GuiRegistry.ts +19 -0
- package/src/gui/registry/factory.ts +12 -0
- package/src/gui/registry/index.ts +3 -0
- package/src/gui/registry/types.ts +6 -0
- package/src/gui/utils/nodeID.ts +11 -0
- package/src/registry/GuiRegistry.ts +19 -0
- package/src/stories/01.Home.mdx +22 -0
- package/src/stories/02.Understanding.This.GUI.mdx +149 -0
- package/src/stories/Theme/Palette.stories.tsx +86 -0
- package/src/stories/Theme/ThemeViewer.stories.tsx +91 -0
- package/src/stories/Theme/Typography.stories.jsx +211 -0
- package/src/stories/assets/this.GUI.png +0 -0
- package/src/types/gui.d.ts +67 -0
- package/src/types/theme.d.ts +191 -0
- package/src/types/viewport.ts +132 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// src/themes/Seafoam/light.tokens.ts
|
|
2
|
+
const lightTokens = {
|
|
3
|
+
"$description": "Seafoam Light theme — a fresh, tranquil palette inspired by ocean hues and coastal light.",
|
|
4
|
+
"id": "Seafoam-light",
|
|
5
|
+
"extends": "global.tokens.json",
|
|
6
|
+
"color": {
|
|
7
|
+
"primary": { "$type": "color", "$value": "#2C6675" }, // deep teal blue
|
|
8
|
+
"secondary": { "$type": "color", "$value": "#5FA8B0" }, // cool sea blue
|
|
9
|
+
"accent": { "$type": "color", "$value": "#A9D7D3" }, // soft seafoam
|
|
10
|
+
"icon": { "$type": "color", "$value": "#37474f" }, // dark slate gray
|
|
11
|
+
"background": {
|
|
12
|
+
"default": { "$type": "color", "$value": "#E8F0EF" }, // misty aqua-white
|
|
13
|
+
"paper": { "$type": "color", "$value": "#F6F9F9" }, // light and airy
|
|
14
|
+
"nav": { "$type": "color", "$value": "#D6E7E5" } // subtle ocean breeze tone
|
|
15
|
+
},
|
|
16
|
+
"textPrimary": { "$type": "color", "$value": "#1C2626" },
|
|
17
|
+
"textSecondary": { "$type": "color", "$value": "rgba(28, 38, 38, 0.7)" },
|
|
18
|
+
"link": { "$type": "color", "$value": "#2C6675" },
|
|
19
|
+
"linkVisited": { "$type": "color", "$value": "#457B84" },
|
|
20
|
+
"border": { "$type": "color", "$value": "rgba(44, 102, 117, 0.2)" },
|
|
21
|
+
"section": {
|
|
22
|
+
"default": { "$type": "color", "$value": "#E3EFEE" }, // pale aqua background
|
|
23
|
+
"subtle": { "$type": "color", "$value": "#F5FBFB" }, // soft ocean mist
|
|
24
|
+
"strong": { "$type": "color", "$value": "#D1E3E1" }, // calm turquoise section
|
|
25
|
+
"accent": { "$type": "color", "$value": "#F3E0CF" }, // sandy warmth
|
|
26
|
+
"highlight": { "$type": "color", "$value": "#FFE9DD" } // light coral-beige
|
|
27
|
+
},
|
|
28
|
+
"blur": {
|
|
29
|
+
"light": { "$type": "color", "$value": "rgba(200, 245, 250, 0.45)" }, // seafoam mist — bright and fresh
|
|
30
|
+
"medium": { "$type": "color", "$value": "rgba(180, 235, 240, 0.65)" }, // soft aqua drift
|
|
31
|
+
"heavy": { "$type": "color", "$value": "rgba(160, 225, 235, 0.85)" }, // deep ocean calm
|
|
32
|
+
"all": { "$type": "color", "$value": "rgba(145, 215, 230, 1)" } // Caribbean blue glow
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"effects": {
|
|
36
|
+
"shadow": {
|
|
37
|
+
"$type": "shadow",
|
|
38
|
+
"$value": "0px 4px 12px rgba(28, 38, 38, 0.1)"
|
|
39
|
+
},
|
|
40
|
+
"glow": {
|
|
41
|
+
"$type": "shadow",
|
|
42
|
+
"$value": "0px 0px 16px rgba(95, 168, 176, 0.25)"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default lightTokens;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/themes/tokens/Seafoam/manifest.ts
|
|
2
|
+
import type { ThemeManifest } from '@/types/theme';
|
|
3
|
+
import badgeImage from './seaFoam.png';
|
|
4
|
+
import lightTokens from './light.tokens';
|
|
5
|
+
import darkTokens from './dark.tokens';
|
|
6
|
+
const SeafoamManifest: ThemeManifest = {
|
|
7
|
+
themeId: 'seafoam',
|
|
8
|
+
themeName: 'Seafoam',
|
|
9
|
+
description: 'A refreshing theme inspired by the colors of the sea, perfect for a calm and serene coding experience.',
|
|
10
|
+
author: 'suiGn',
|
|
11
|
+
version: '1.0.0',
|
|
12
|
+
license: 'MIT',
|
|
13
|
+
homepage: 'https://neurons.me/',
|
|
14
|
+
tags: ['official', 'default'],
|
|
15
|
+
createdAt: '2025-09-16T00:00:00.000Z',
|
|
16
|
+
updatedAt: '2025-09-16T00:00:00.000Z',
|
|
17
|
+
badgeUrl: badgeImage,
|
|
18
|
+
mode: {
|
|
19
|
+
light: lightTokens,
|
|
20
|
+
dark: darkTokens,
|
|
21
|
+
},
|
|
22
|
+
defaultMode: 'dark'
|
|
23
|
+
};
|
|
24
|
+
export default SeafoamManifest;
|
|
Binary file
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// src/themes/catalog/neurons/dark.tokens.ts
|
|
2
|
+
// Neurons Dark Theme Tokens — overrides applied on top of global.tokens.json
|
|
3
|
+
const darkTokens = {
|
|
4
|
+
"id": "neurons-dark",
|
|
5
|
+
"$description": "Neurons Dark Theme Tokens — overrides applied on top of global.tokens.json",
|
|
6
|
+
"color": {
|
|
7
|
+
"primary": {
|
|
8
|
+
"$type": "color",
|
|
9
|
+
"$value": "#90caf9"
|
|
10
|
+
},
|
|
11
|
+
"secondary": {
|
|
12
|
+
"$type": "color",
|
|
13
|
+
"$value": "#6FC7B5"
|
|
14
|
+
},
|
|
15
|
+
"icon": {
|
|
16
|
+
"$type": "color",
|
|
17
|
+
"$value": "#a8a8a8"
|
|
18
|
+
},
|
|
19
|
+
"background": {
|
|
20
|
+
"default": { "$type": "color", "$value": "#121214" },
|
|
21
|
+
"paper": { "$type": "color", "$value": "#181a1c" },
|
|
22
|
+
"nav": { "$type": "color", "$value": "rgba(18,18,20,0.95)" }
|
|
23
|
+
},
|
|
24
|
+
"textPrimary": {
|
|
25
|
+
"$type": "color",
|
|
26
|
+
"$value": "#ffffff"
|
|
27
|
+
},
|
|
28
|
+
"textSecondary": {
|
|
29
|
+
"$type": "color",
|
|
30
|
+
"$value": "rgba(255,255,255,0.75)"
|
|
31
|
+
},
|
|
32
|
+
"link": {
|
|
33
|
+
"$type": "color",
|
|
34
|
+
"$value": "#00aa96"
|
|
35
|
+
},
|
|
36
|
+
"linkVisited": {
|
|
37
|
+
"$type": "color",
|
|
38
|
+
"$value": "#008278"
|
|
39
|
+
},
|
|
40
|
+
"border": {
|
|
41
|
+
"$type": "color",
|
|
42
|
+
"$value": "rgb(45,45,55)"
|
|
43
|
+
},
|
|
44
|
+
"section": {
|
|
45
|
+
"default": { "$type": "color", "$value": "#121212" },
|
|
46
|
+
"subtle": { "$type": "color", "$value": "#1a1a1a" },
|
|
47
|
+
"strong": { "$type": "color", "$value": "#202020" }
|
|
48
|
+
},
|
|
49
|
+
"blur": {
|
|
50
|
+
"light": { "$type": "color", "$value": "rgba(34, 83, 70, 0.55);" },
|
|
51
|
+
"medium": { "$type": "color", "$value": "rgba(34, 83, 70, 0.69)" },
|
|
52
|
+
"heavy": { "$type": "color", "$value": "rgba(21, 27, 25, 0.89);" },
|
|
53
|
+
"all": { "$type": "color", "$value": "rgba(31, 38, 36, 0.98);" }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default darkTokens;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// src/themes/catalog/neurons/light.tokens.ts
|
|
2
|
+
const lightTokens = {
|
|
3
|
+
"$description": "Design tokens for neurons.light theme — part of This.GUI ecosystem",
|
|
4
|
+
"id": "neurons-light",
|
|
5
|
+
"extends": "global.tokens.json",
|
|
6
|
+
"color": {
|
|
7
|
+
"primary": {
|
|
8
|
+
"$type": "color",
|
|
9
|
+
"$value": "#0a3a42"
|
|
10
|
+
},
|
|
11
|
+
"secondary": {
|
|
12
|
+
"$type": "color",
|
|
13
|
+
"$value": "#e5396f"
|
|
14
|
+
},
|
|
15
|
+
"icon": {
|
|
16
|
+
"$type": "color",
|
|
17
|
+
"$value": "#5e5e5e"
|
|
18
|
+
},
|
|
19
|
+
"default": {
|
|
20
|
+
"$type": "color",
|
|
21
|
+
"$value": "#f8f9fa"
|
|
22
|
+
},
|
|
23
|
+
"paper": {
|
|
24
|
+
"$type": "color",
|
|
25
|
+
"$value": "#ffffff"
|
|
26
|
+
},
|
|
27
|
+
"nav": {
|
|
28
|
+
"$type": "color",
|
|
29
|
+
"$value": "#fdfdfd"
|
|
30
|
+
},
|
|
31
|
+
"textPrimary": {
|
|
32
|
+
"$type": "color",
|
|
33
|
+
"$value": "#111111"
|
|
34
|
+
},
|
|
35
|
+
"textSecondary": {
|
|
36
|
+
"$type": "color",
|
|
37
|
+
"$value": "#444444"
|
|
38
|
+
},
|
|
39
|
+
"link": {
|
|
40
|
+
"$type": "color",
|
|
41
|
+
"$value": "#008c7d"
|
|
42
|
+
},
|
|
43
|
+
"linkVisited": {
|
|
44
|
+
"$type": "color",
|
|
45
|
+
"$value": "#006e64"
|
|
46
|
+
},
|
|
47
|
+
"border": {
|
|
48
|
+
"$type": "color",
|
|
49
|
+
"$value": "rgba(0,0,0,0.08)"
|
|
50
|
+
},
|
|
51
|
+
"section": {
|
|
52
|
+
"default": {
|
|
53
|
+
"$type": "color",
|
|
54
|
+
"$value": "#f9f9fb"
|
|
55
|
+
},
|
|
56
|
+
"subtle": {
|
|
57
|
+
"$type": "color",
|
|
58
|
+
"$value": "#ffffff"
|
|
59
|
+
},
|
|
60
|
+
"strong": {
|
|
61
|
+
"$type": "color",
|
|
62
|
+
"$value": "#f0f2f5"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"blur": {
|
|
66
|
+
"light": { "$type": "color", "$value": "rgba(34, 83, 70, 0.55);" },
|
|
67
|
+
"medium": { "$type": "color", "$value": "rgba(34, 83, 70, 0.69)" },
|
|
68
|
+
"heavy": { "$type": "color", "$value": "rgba(21, 27, 25, 0.89);" },
|
|
69
|
+
"all": { "$type": "color", "$value": "rgba(31, 38, 36, 0.98);" }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export default lightTokens;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/themes/catalog/neurons/manifest.ts
|
|
2
|
+
import type { ThemeManifest } from '@/types/theme';
|
|
3
|
+
import badgeImage from './neurons.me.png';
|
|
4
|
+
import lightTokens from './light.tokens';
|
|
5
|
+
import darkTokens from './dark.tokens';
|
|
6
|
+
const neuronsManifest: ThemeManifest = {
|
|
7
|
+
themeId: 'neurons.me',
|
|
8
|
+
themeName: 'neurons.me',
|
|
9
|
+
description: 'A modern, flexible theme for the Neuroverse, designed to enhance productivity and creativity.',
|
|
10
|
+
author: 'suiGn',
|
|
11
|
+
version: '1.0.0',
|
|
12
|
+
license: 'MIT',
|
|
13
|
+
homepage: 'https://neurons.me/',
|
|
14
|
+
tags: ['official', 'default'],
|
|
15
|
+
createdAt: '2025-09-16T00:00:00.000Z',
|
|
16
|
+
updatedAt: '2025-09-16T00:00:00.000Z',
|
|
17
|
+
badgeUrl: badgeImage,
|
|
18
|
+
mode: {
|
|
19
|
+
light: lightTokens,
|
|
20
|
+
dark: darkTokens,
|
|
21
|
+
},
|
|
22
|
+
defaultMode: 'dark'
|
|
23
|
+
};
|
|
24
|
+
export default neuronsManifest;
|
|
Binary file
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
// src/themes/fromTokens.ts
|
|
2
|
+
import { createTheme, type Theme } from '@mui/material/styles';
|
|
3
|
+
import { buildShadows } from '@/gui/Theme/styles/buildShadows';
|
|
4
|
+
// Helpers ------------------------------------------------------------
|
|
5
|
+
declare module '@mui/material/styles' {
|
|
6
|
+
interface Palette {
|
|
7
|
+
section: {
|
|
8
|
+
default: string;
|
|
9
|
+
subtle: string;
|
|
10
|
+
strong: string;
|
|
11
|
+
};
|
|
12
|
+
blur: {
|
|
13
|
+
light: string;
|
|
14
|
+
medium: string;
|
|
15
|
+
heavy: string;
|
|
16
|
+
all: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
interface PaletteOptions {
|
|
20
|
+
section?: {
|
|
21
|
+
default?: string;
|
|
22
|
+
subtle?: string;
|
|
23
|
+
strong?: string;
|
|
24
|
+
};
|
|
25
|
+
blur?: {
|
|
26
|
+
light?: string;
|
|
27
|
+
medium?: string;
|
|
28
|
+
heavy?: string;
|
|
29
|
+
all?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const pxToRem = (n: number): string => `${n / 16}rem`;
|
|
35
|
+
const pick = <T = any,>(obj: any, path: Array<string | number>, fallback?: T): T => {
|
|
36
|
+
// Safely read nested token value supporting multiple token shapes
|
|
37
|
+
// - Tokens Studio style: { $value: '...' }
|
|
38
|
+
// - simple style: { value: '...' }
|
|
39
|
+
// - raw primitive values
|
|
40
|
+
const raw = path.reduce<any>((acc, k) => (acc && acc[k] !== undefined ? acc[k] : undefined), obj) ?? undefined;
|
|
41
|
+
if (raw && typeof raw === 'object') {
|
|
42
|
+
if ('$value' in raw) return (raw as any).$value as T;
|
|
43
|
+
if ('value' in raw) return (raw as any).value as T;
|
|
44
|
+
}
|
|
45
|
+
return (raw ?? fallback) as T;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const readNumber = (v: unknown, fb: number): number => {
|
|
49
|
+
if (v === undefined || v === null) return fb;
|
|
50
|
+
const n = typeof v === 'string' ? parseFloat(v) : (v as number);
|
|
51
|
+
return Number.isFinite(n) ? (n as number) : fb;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// Main compiler ------------------------------------------------------
|
|
55
|
+
export function makeMuiTheme(themeTokens: any, modeTokens: any, mode: 'light' | 'dark' = 'light'): Theme {
|
|
56
|
+
const g = themeTokens || {};
|
|
57
|
+
const c = modeTokens?.color || {};
|
|
58
|
+
const blurTokens = pick(modeTokens, ['blur'], pick(c, ['blur'], undefined));
|
|
59
|
+
const blurRadiusTokens =
|
|
60
|
+
pick(g, ['blur', 'radius'], undefined) ??
|
|
61
|
+
pick(g, ['custom', 'blurRadius'], undefined) ??
|
|
62
|
+
pick(g, ['blurRadius'], undefined);
|
|
63
|
+
// Core primitives
|
|
64
|
+
const radius = readNumber(pick(g, ['radius', 'md'], 10), 10);
|
|
65
|
+
const spacing = readNumber(pick(g, ['spacing', 'base'], 8), 8);
|
|
66
|
+
const fontFamily = pick<string>(g, ['font', 'family'], 'Roboto, sans-serif');
|
|
67
|
+
const borderDefault =
|
|
68
|
+
pick<string | undefined>(g, ['border', 'default'], undefined) ??
|
|
69
|
+
(mode === 'dark' ? 'rgb(45,45,55)' : 'rgba(0,0,0,0.08)');
|
|
70
|
+
// Extended tokens
|
|
71
|
+
const semantic = modeTokens?.extendedColors || modeTokens?.semantic || {};
|
|
72
|
+
const gradients = semantic?.gradients || {};
|
|
73
|
+
const overlays = semantic?.overlays || {};
|
|
74
|
+
const zIndexTokens = g.zIndex || {};
|
|
75
|
+
const breakpointsTokens = g.breakpoints || {};
|
|
76
|
+
const motion = g.motion || {};
|
|
77
|
+
const opacity = g.opacity || {};
|
|
78
|
+
const iconSizes = g.iconSizes || {};
|
|
79
|
+
const lineHeights = g.lineHeights || {};
|
|
80
|
+
const shadowsTokens = g.shadows;
|
|
81
|
+
// Build MUI theme
|
|
82
|
+
const theme = createTheme({
|
|
83
|
+
// Palette accepts custom keys like `link` and `background.nav` in our design system,
|
|
84
|
+
// so we cast to any to avoid fighting MUI's strict palette types.
|
|
85
|
+
palette: {
|
|
86
|
+
mode,
|
|
87
|
+
primary: { main: pick(c, ['primary'], '#1976d2') },
|
|
88
|
+
secondary: { main: pick(c, ['secondary'], '#9c27b0') },
|
|
89
|
+
icon: { main: pick(c, ['icon'], '#5e5e5e') },
|
|
90
|
+
background: {
|
|
91
|
+
default: pick(c, ['background','default'], mode === 'dark' ? '#121214' : '#f8f9fa'),
|
|
92
|
+
paper: pick(c, ['background','paper'], mode === 'dark' ? '#181a1c' : '#fff'),
|
|
93
|
+
nav: pick(c, ['background','nav'], mode === 'dark' ? '#16181a' : '#fdfdfd'),
|
|
94
|
+
},
|
|
95
|
+
text: {
|
|
96
|
+
primary: pick(c, ['textPrimary'], mode === 'dark' ? '#fff' : '#111'),
|
|
97
|
+
secondary: pick(
|
|
98
|
+
c,
|
|
99
|
+
['textSecondary'],
|
|
100
|
+
mode === 'dark' ? 'rgba(255,255,255,0.7)' : '#444'
|
|
101
|
+
),
|
|
102
|
+
},
|
|
103
|
+
link: {
|
|
104
|
+
main: pick(c, ['link'], mode === 'dark' ? '#00aa96' : '#008c7d'),
|
|
105
|
+
visited: pick(c, ['linkVisited'], mode === 'dark' ? '#008278' : '#006e64'),
|
|
106
|
+
},
|
|
107
|
+
error: { main: pick(semantic, ['error'], mode === 'dark' ? '#ef5350' : '#d32f2f') },
|
|
108
|
+
warning: { main: pick(semantic, ['warning'], '#ed6c02') },
|
|
109
|
+
info: { main: pick(semantic, ['info'], '#0288d1') },
|
|
110
|
+
success: { main: pick(semantic, ['success'], '#2e7d32') },
|
|
111
|
+
divider: pick(c, ['border'], borderDefault),
|
|
112
|
+
action: {
|
|
113
|
+
hoverOpacity: readNumber(pick(opacity, ['hover'], 0.08), 0.08),
|
|
114
|
+
selectedOpacity: readNumber(pick(opacity, ['selected'], 0.12), 0.12),
|
|
115
|
+
disabledOpacity: readNumber(pick(opacity, ['disabled'], 0.38), 0.38),
|
|
116
|
+
focusOpacity: readNumber(pick(opacity, ['focus'], 0.12), 0.12),
|
|
117
|
+
activatedOpacity: readNumber(pick(opacity, ['activated'], 0.12), 0.12),
|
|
118
|
+
},
|
|
119
|
+
section: mode === 'dark' ? {
|
|
120
|
+
default: '#121212',
|
|
121
|
+
subtle: '#1a1a1a',
|
|
122
|
+
strong: '#202020',
|
|
123
|
+
} : {
|
|
124
|
+
default: '#f9f9fb',
|
|
125
|
+
subtle: '#ffffff',
|
|
126
|
+
strong: '#f0f2f5',
|
|
127
|
+
},
|
|
128
|
+
blur: blurTokens ?? (
|
|
129
|
+
mode === 'dark'
|
|
130
|
+
? {
|
|
131
|
+
light: 'rgba(25, 37, 36, 1)',
|
|
132
|
+
medium: 'rgba(25, 37, 36, 1)',
|
|
133
|
+
heavy: 'rgba(25, 37, 36, 1)',
|
|
134
|
+
all: 'rgba(25, 37, 36, 1)',
|
|
135
|
+
}
|
|
136
|
+
: {
|
|
137
|
+
light: 'rgba(255, 245, 250, 1)',
|
|
138
|
+
medium: 'rgba(255, 240, 245, 1)',
|
|
139
|
+
heavy: 'rgba(255, 235, 240, 1)',
|
|
140
|
+
all: 'rgba(255, 220, 230, 1)',
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
},
|
|
144
|
+
// All tokens exposed under theme.custom for easy access
|
|
145
|
+
custom: {
|
|
146
|
+
border: pick(c, ['border'], borderDefault),
|
|
147
|
+
gradients,
|
|
148
|
+
overlays,
|
|
149
|
+
iconSizes,
|
|
150
|
+
lineHeights,
|
|
151
|
+
blurRadius: {
|
|
152
|
+
light: pick(blurRadiusTokens, ['light'], '6px'),
|
|
153
|
+
medium: pick(blurRadiusTokens, ['medium'], '12px'),
|
|
154
|
+
heavy: pick(blurRadiusTokens, ['heavy'], '24px'),
|
|
155
|
+
all: pick(blurRadiusTokens, ['all'], '32px'),
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
shape: { borderRadius: Number.isFinite(radius) ? (radius as number) : 10 },
|
|
159
|
+
spacing: Number.isFinite(spacing) ? (spacing as number) : 8,
|
|
160
|
+
breakpoints: {
|
|
161
|
+
values: {
|
|
162
|
+
xs: readNumber(pick(breakpointsTokens, ['values', 'xs'], 0), 0),
|
|
163
|
+
sm: readNumber(pick(breakpointsTokens, ['values', 'sm'], 600), 600),
|
|
164
|
+
md: readNumber(pick(breakpointsTokens, ['values', 'md'], 900), 900),
|
|
165
|
+
lg: readNumber(pick(breakpointsTokens, ['values', 'lg'], 1200), 1200),
|
|
166
|
+
xl: readNumber(pick(breakpointsTokens, ['values', 'xl'], 1536), 1536),
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
zIndex: {
|
|
170
|
+
appBar: readNumber(pick(zIndexTokens, ['appBar'], 1100), 1100),
|
|
171
|
+
drawer: readNumber(pick(zIndexTokens, ['drawer'], 1200), 1200),
|
|
172
|
+
modal: readNumber(pick(zIndexTokens, ['modal'], 1300), 1300),
|
|
173
|
+
snackbar: readNumber(pick(zIndexTokens, ['snackbar'], 1400), 1400),
|
|
174
|
+
tooltip: readNumber(pick(zIndexTokens, ['tooltip'], 1500), 1500),
|
|
175
|
+
},
|
|
176
|
+
transitions: {
|
|
177
|
+
easing: {
|
|
178
|
+
easeInOut: pick(motion, ['easing', 'standard'], 'cubic-bezier(0.4, 0, 0.2, 1)'),
|
|
179
|
+
easeOut: pick(motion, ['easing', 'decelerate'], 'cubic-bezier(0.0, 0, 0.2, 1)'),
|
|
180
|
+
easeIn: pick(motion, ['easing', 'accelerate'], 'cubic-bezier(0.4, 0, 1, 1)'),
|
|
181
|
+
sharp: pick(motion, ['easing', 'sharp'], 'cubic-bezier(0.4, 0, 0.6, 1)'),
|
|
182
|
+
},
|
|
183
|
+
duration: {
|
|
184
|
+
shortest: readNumber(pick(motion, ['duration', 'shortest'], 150), 150),
|
|
185
|
+
shorter: readNumber(pick(motion, ['duration', 'shorter'], 200), 200),
|
|
186
|
+
short: readNumber(pick(motion, ['duration', 'short'], 250), 250),
|
|
187
|
+
standard: readNumber(pick(motion, ['duration', 'standard'], 300), 300),
|
|
188
|
+
complex: readNumber(pick(motion, ['duration', 'complex'], 375), 375),
|
|
189
|
+
enteringScreen: readNumber(pick(motion, ['duration', 'entering'], 225), 225),
|
|
190
|
+
leavingScreen: readNumber(pick(motion, ['duration', 'leaving'], 195), 195),
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
typography: {
|
|
194
|
+
fontFamily,
|
|
195
|
+
// existing variants
|
|
196
|
+
h1: { fontSize: pxToRem(40), fontWeight: 600, lineHeight: 1.2, letterSpacing: '-0.01em' },
|
|
197
|
+
h2: { fontSize: pxToRem(32), fontWeight: 600, lineHeight: 1.25 },
|
|
198
|
+
h3: { fontSize: pxToRem(26), fontWeight: 600, lineHeight: 1.3 },
|
|
199
|
+
h4: { fontSize: pxToRem(21), fontWeight: 600, lineHeight: 1.35 },
|
|
200
|
+
h5: { fontSize: pxToRem(18), fontWeight: 600, lineHeight: 1.35 },
|
|
201
|
+
subtitle1: { fontSize: pxToRem(16), fontWeight: 600, lineHeight: 1.4 },
|
|
202
|
+
body1: { fontSize: pxToRem(16), lineHeight: 1.6 },
|
|
203
|
+
body2: { fontSize: pxToRem(14), lineHeight: 1.6 },
|
|
204
|
+
button: { textTransform: 'none', fontWeight: 700, letterSpacing: '0.02em' },
|
|
205
|
+
},
|
|
206
|
+
shadows: buildShadows(shadowsTokens, mode),
|
|
207
|
+
layout: {
|
|
208
|
+
insets: {
|
|
209
|
+
left: readNumber(pick(g, ['layout', 'insets', 'left'], 0), 0),
|
|
210
|
+
right: readNumber(pick(g, ['layout', 'insets', 'right'], 0), 0),
|
|
211
|
+
top: readNumber(pick(g, ['layout', 'insets', 'top'], 0), 0),
|
|
212
|
+
bottom: readNumber(pick(g, ['layout', 'insets', 'bottom'], 0), 0),
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
components: {
|
|
216
|
+
MuiButton: {
|
|
217
|
+
defaultProps: { disableElevation: true },
|
|
218
|
+
styleOverrides: {
|
|
219
|
+
root: ({ theme }) => ({ borderRadius: theme.shape.borderRadius }),
|
|
220
|
+
sizeLarge: { padding: '12px 20px' },
|
|
221
|
+
sizeMedium: { padding: '10px 18px' },
|
|
222
|
+
sizeSmall: { padding: '8px 14px' },
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
MuiPaper: { styleOverrides: { rounded: { borderRadius: 14 } } },
|
|
226
|
+
MuiTextField: { defaultProps: { size: 'small' } },
|
|
227
|
+
MuiCssBaseline: {
|
|
228
|
+
styleOverrides: (theme) => ({
|
|
229
|
+
':root': {
|
|
230
|
+
'--gui-primary': theme.palette.primary.main,
|
|
231
|
+
'--gui-secondary': theme.palette.secondary.main,
|
|
232
|
+
'--gui-bg-default': theme.palette.background.default,
|
|
233
|
+
'--gui-bg-paper': theme.palette.background.paper,
|
|
234
|
+
'--gui-bg-nav': theme.palette.background.nav || theme.palette.background.paper,
|
|
235
|
+
'--gui-text-primary': theme.palette.text.primary,
|
|
236
|
+
'--gui-text-secondary': theme.palette.text.secondary,
|
|
237
|
+
'--gui-link': theme.palette.link.main,
|
|
238
|
+
'--gui-link-visited': theme.palette.link.visited || theme.palette.link.main,
|
|
239
|
+
'--gui-border': theme.custom?.border || theme.palette.divider,
|
|
240
|
+
// Motion / opacity / icon sizes CSS vars for non-MUI DOM
|
|
241
|
+
'--gui-ease-standard': theme.transitions.easing.easeInOut,
|
|
242
|
+
'--gui-duration-standard': `${theme.transitions.duration.standard}ms`,
|
|
243
|
+
'--gui-opacity-hover': theme.palette.action.hoverOpacity,
|
|
244
|
+
'--gui-opacity-disabled': theme.palette.action.disabledOpacity,
|
|
245
|
+
'--gui-icon-size-sm': (iconSizes as any).sm ?? '16px',
|
|
246
|
+
'--gui-icon-size-md': (iconSizes as any).md ?? '20px',
|
|
247
|
+
'--gui-icon-size-lg': (iconSizes as any).lg ?? '24px',
|
|
248
|
+
'--gui-radius': `${theme.shape.borderRadius}px`,
|
|
249
|
+
'--gui-font-family': theme.typography.fontFamily,
|
|
250
|
+
'--gui-spacing': typeof theme.spacing === 'function' ? theme.spacing(1) : `${(theme as any).spacing}px`,
|
|
251
|
+
'--gui-inset-left': theme.layout.insets.left + 'px',
|
|
252
|
+
'--gui-inset-right': theme.layout.insets.right + 'px',
|
|
253
|
+
'--gui-inset-top': theme.layout.insets.top + 'px',
|
|
254
|
+
'--gui-inset-bottom': theme.layout.insets.bottom + 'px',
|
|
255
|
+
},
|
|
256
|
+
body: {
|
|
257
|
+
fontFamily: theme.typography.fontFamily,
|
|
258
|
+
backgroundColor: theme.palette.background.default,
|
|
259
|
+
color: theme.palette.text.primary,
|
|
260
|
+
},
|
|
261
|
+
a: {
|
|
262
|
+
color: theme.palette.link.main,
|
|
263
|
+
textDecoration: 'none',
|
|
264
|
+
'&:hover': { textDecoration: 'underline' },
|
|
265
|
+
'&:visited': { color: theme.palette.link.visited || theme.palette.link.main },
|
|
266
|
+
},
|
|
267
|
+
}),
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
});
|
|
271
|
+
return theme;
|
|
272
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* themes/GUI.css
|
|
2
|
+
GUI Theme CSS Variables and Layout */
|
|
3
|
+
:root {
|
|
4
|
+
/* Layout insets, injected and/or overridden by theme or runtime */
|
|
5
|
+
--gui-inset-left: 0px;
|
|
6
|
+
--gui-inset-right: 0px;
|
|
7
|
+
--gui-inset-top: 48px;
|
|
8
|
+
--gui-inset-bottom: 0px;
|
|
9
|
+
/* Example additional tokens */
|
|
10
|
+
--radius-sm: 4px;
|
|
11
|
+
--radius-md: 8px;
|
|
12
|
+
--radius-lg: 12px;
|
|
13
|
+
--z-index-navbar: 1100;
|
|
14
|
+
--z-index-drawer: 1200;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Default body layout respecting insets */
|
|
18
|
+
body {
|
|
19
|
+
padding-top: var(--gui-inset-top);
|
|
20
|
+
padding-left: var(--gui-inset-left);
|
|
21
|
+
padding-right: var(--gui-inset-right);
|
|
22
|
+
padding-bottom: var(--gui-inset-bottom);
|
|
23
|
+
margin: 0;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Utility container class */
|
|
28
|
+
.gui-container {
|
|
29
|
+
padding: var(--gui-inset-top) var(--gui-inset-right) var(--gui-inset-bottom) var(--gui-inset-left);
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/themes/index.ts
|
|
2
|
+
// Global tokens shared by all themes (radius, spacing, zIndex, etc.)
|
|
3
|
+
export type { Theme } from '@mui/material/styles';
|
|
4
|
+
// Theme persistence utilities
|
|
5
|
+
export { getInitialThemeId, usePersistentThemeId } from './utils/persistence';
|
|
6
|
+
// Theme context and provider
|
|
7
|
+
export { ThemeContext, useThemeContext } from '@/gui/contexts/ThemeContext';
|
|
8
|
+
export { default as GuiProvider } from './GuiProvider';
|
|
9
|
+
// Theme catalog access
|
|
10
|
+
export {
|
|
11
|
+
GuiThemes,
|
|
12
|
+
FlatGuiThemes,
|
|
13
|
+
getGuiThemes,
|
|
14
|
+
getFlatGuiThemes,
|
|
15
|
+
getGuiTheme,
|
|
16
|
+
getFlatGuiTheme,
|
|
17
|
+
} from './utils/catalog';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// themes/styles/buildShadows.ts
|
|
2
|
+
import { Theme } from '@mui/material/styles';
|
|
3
|
+
export const buildShadows = (shadowTokens: any, mode: 'light' | 'dark'): Theme['shadows'] => {
|
|
4
|
+
const DEFAULT_SHADOWS: string[] =
|
|
5
|
+
mode === 'dark'
|
|
6
|
+
? [
|
|
7
|
+
'none',
|
|
8
|
+
'0px 1px 2px rgba(0,0,0,0.6)',
|
|
9
|
+
'0px 2px 4px rgba(0,0,0,0.55)',
|
|
10
|
+
'0px 3px 6px rgba(0,0,0,0.5)',
|
|
11
|
+
'0px 4px 8px rgba(0,0,0,0.45)',
|
|
12
|
+
'0px 5px 10px rgba(0,0,0,0.4)',
|
|
13
|
+
'0px 6px 12px rgba(0,0,0,0.38)',
|
|
14
|
+
'0px 7px 14px rgba(0,0,0,0.36)',
|
|
15
|
+
'0px 8px 16px rgba(0,0,0,0.34)',
|
|
16
|
+
'0px 9px 18px rgba(0,0,0,0.32)',
|
|
17
|
+
'0px 10px 20px rgba(0,0,0,0.3)',
|
|
18
|
+
'0px 11px 22px rgba(0,0,0,0.28)',
|
|
19
|
+
'0px 12px 24px rgba(0,0,0,0.26)',
|
|
20
|
+
'0px 13px 26px rgba(0,0,0,0.24)',
|
|
21
|
+
'0px 14px 28px rgba(0,0,0,0.22)',
|
|
22
|
+
'0px 15px 30px rgba(0,0,0,0.2)',
|
|
23
|
+
'0px 16px 32px rgba(0,0,0,0.19)',
|
|
24
|
+
'0px 17px 34px rgba(0,0,0,0.18)',
|
|
25
|
+
'0px 18px 36px rgba(0,0,0,0.17)',
|
|
26
|
+
'0px 19px 38px rgba(0,0,0,0.16)',
|
|
27
|
+
'0px 20px 40px rgba(0,0,0,0.15)',
|
|
28
|
+
'0px 22px 44px rgba(0,0,0,0.14)',
|
|
29
|
+
'0px 24px 48px rgba(0,0,0,0.13)',
|
|
30
|
+
'0px 26px 52px rgba(0,0,0,0.12)',
|
|
31
|
+
'0px 28px 56px rgba(0,0,0,0.11)',
|
|
32
|
+
]
|
|
33
|
+
: [
|
|
34
|
+
'none',
|
|
35
|
+
'0px 1px 2px rgba(0,0,0,0.08)',
|
|
36
|
+
'0px 2px 4px rgba(0,0,0,0.1)',
|
|
37
|
+
'0px 3px 6px rgba(0,0,0,0.12)',
|
|
38
|
+
'0px 4px 8px rgba(0,0,0,0.14)',
|
|
39
|
+
'0px 5px 10px rgba(0,0,0,0.15)',
|
|
40
|
+
'0px 6px 12px rgba(0,0,0,0.16)',
|
|
41
|
+
'0px 7px 14px rgba(0,0,0,0.17)',
|
|
42
|
+
'0px 8px 16px rgba(0,0,0,0.18)',
|
|
43
|
+
'0px 9px 18px rgba(0,0,0,0.19)',
|
|
44
|
+
'0px 10px 20px rgba(0,0,0,0.2)',
|
|
45
|
+
'0px 11px 22px rgba(0,0,0,0.21)',
|
|
46
|
+
'0px 12px 24px rgba(0,0,0,0.22)',
|
|
47
|
+
'0px 13px 26px rgba(0,0,0,0.23)',
|
|
48
|
+
'0px 14px 28px rgba(0,0,0,0.24)',
|
|
49
|
+
'0px 15px 30px rgba(0,0,0,0.25)',
|
|
50
|
+
'0px 16px 32px rgba(0,0,0,0.26)',
|
|
51
|
+
'0px 17px 34px rgba(0,0,0,0.27)',
|
|
52
|
+
'0px 18px 36px rgba(0,0,0,0.28)',
|
|
53
|
+
'0px 19px 38px rgba(0,0,0,0.29)',
|
|
54
|
+
'0px 20px 40px rgba(0,0,0,0.3)',
|
|
55
|
+
'0px 22px 44px rgba(0,0,0,0.31)',
|
|
56
|
+
'0px 24px 48px rgba(0,0,0,0.32)',
|
|
57
|
+
'0px 26px 52px rgba(0,0,0,0.33)',
|
|
58
|
+
'0px 28px 56px rgba(0,0,0,0.34)',
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
const ensureArrayLen = <T,>(arr: T[] | unknown, len: number, filler: T): T[] => {
|
|
62
|
+
const a = Array.isArray(arr) ? ([...arr] as T[]) : [];
|
|
63
|
+
for (let i = a.length; i < len; i++) a.push(filler);
|
|
64
|
+
return a.slice(0, len);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
if (Array.isArray(shadowTokens)) {
|
|
68
|
+
return ensureArrayLen<string>(shadowTokens, 25, DEFAULT_SHADOWS[0]) as Theme['shadows'];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (shadowTokens && typeof shadowTokens === 'object') {
|
|
72
|
+
const arr: string[] = [];
|
|
73
|
+
for (let i = 0; i < 25; i++) {
|
|
74
|
+
const v =
|
|
75
|
+
shadowTokens?.[i] ??
|
|
76
|
+
shadowTokens?.[`s${i}`];
|
|
77
|
+
arr.push(v ?? DEFAULT_SHADOWS[i] ?? DEFAULT_SHADOWS[0]);
|
|
78
|
+
}
|
|
79
|
+
return arr as Theme['shadows'];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return DEFAULT_SHADOWS as Theme['shadows'];
|
|
83
|
+
};
|